From 40bf163fedeb80f5ebc775bf365cc944e6cdb4cb Mon Sep 17 00:00:00 2001 From: "manuel.montes" Date: Tue, 18 Sep 2018 11:03:30 +0200 Subject: [PATCH] Disabled vlan vhen SNMP version is v3 --- pandora_console/godmode/servers/manage_recontask.php | 5 +++-- pandora_console/godmode/servers/manage_recontask_form.php | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/servers/manage_recontask.php b/pandora_console/godmode/servers/manage_recontask.php index 25f9e048dd..1d5dc69c89 100644 --- a/pandora_console/godmode/servers/manage_recontask.php +++ b/pandora_console/godmode/servers/manage_recontask.php @@ -269,13 +269,15 @@ if (isset($_GET["create"])) { 'snmp_security_level' => '' ); } + if ($values['snmp_version'] == '3'){ + $values['vlan_enabled'] = 0; + } $values = array_merge($values, $values_v3); $name = io_safe_output($name); $name = trim($name, ' '); $name = io_safe_input($name); - html_debug($values, true); $reason = ""; if ($name != "") { @@ -297,7 +299,6 @@ if (isset($_GET["create"])) { } else{ $result = db_process_sql_insert('trecon_task', $values); - html_debug("entra", true); } } else { diff --git a/pandora_console/godmode/servers/manage_recontask_form.php b/pandora_console/godmode/servers/manage_recontask_form.php index eacc850dd4..f5865d1470 100644 --- a/pandora_console/godmode/servers/manage_recontask_form.php +++ b/pandora_console/godmode/servers/manage_recontask_form.php @@ -515,11 +515,14 @@ $('select#snmp_version').change(function () { $(".recon_v3").show(); $("input[name=active_snmp_v3]").val(1); $("input[name=snmp_community]").attr("disabled", true); + $("input[name=vlan_enabled]").removeAttr("checked"); + $("input[name=vlan_enabled]").attr("disabled", true); } else { $(".recon_v3").hide(); $("input[name=active_snmp_v3]").val(0); $("input[name=snmp_community]").removeAttr('disabled'); + $("input[name=vlan_enabled]").removeAttr('disabled'); } });