From 6836ee76f128da6059d16f893b0eff637aa6ddb8 Mon Sep 17 00:00:00 2001 From: bohdan-s Date: Fri, 20 Jun 2014 20:23:41 +1000 Subject: [PATCH] SNMP Default Port Support Use configured SNMP port rather than hard coded. --- html/pages/addhost.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/pages/addhost.inc.php b/html/pages/addhost.inc.php index 4ab7dc2718..1c94ea3c5f 100644 --- a/html/pages/addhost.inc.php +++ b/html/pages/addhost.inc.php @@ -23,7 +23,7 @@ if ($_POST['hostname']) } $snmpver = mres($_POST['snmpver']); - if ($_POST['port']) { $port = mres($_POST['port']); } else { $port = "161"; } + if ($_POST['port']) { $port = mres($_POST['port']); } else { $config['snmp']['community']; } print_message("Adding host $hostname communit" . (count($config['snmp']['community']) == 1 ? "y" : "ies") . " " . implode(', ',$config['snmp']['community']) . " port $port"); } elseif ($_POST['snmpver'] === "v3")