From 98966ab3ffff0a3f6807e72be517826645caeaf0 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sun, 16 Sep 2018 15:29:40 +0200 Subject: [PATCH] net/snmp: kill get_possible_listen_ips() use --- net-mgmt/snmp/Makefile | 1 + net-mgmt/snmp/src/etc/inc/plugins.inc.d/bsnmpd.inc | 11 +++-------- net-mgmt/snmp/src/www/services_snmp.php | 11 ++++------- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/net-mgmt/snmp/Makefile b/net-mgmt/snmp/Makefile index bb0b70fbe..359ecbd1b 100644 --- a/net-mgmt/snmp/Makefile +++ b/net-mgmt/snmp/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= snmp PLUGIN_VERSION= 1.3 +PLUGIN_REVISION= 1 PLUGIN_DEPENDS= bsnmp-regex bsnmp-ucd PLUGIN_COMMENT= End of life, superseded by Net-SNMP plugin PLUGIN_MAINTAINER= franco@opnsense.org diff --git a/net-mgmt/snmp/src/etc/inc/plugins.inc.d/bsnmpd.inc b/net-mgmt/snmp/src/etc/inc/plugins.inc.d/bsnmpd.inc index b0c5885b9..f63f81f6b 100644 --- a/net-mgmt/snmp/src/etc/inc/plugins.inc.d/bsnmpd.inc +++ b/net-mgmt/snmp/src/etc/inc/plugins.inc.d/bsnmpd.inc @@ -128,14 +128,9 @@ EOD; $bind_to_ip = '0.0.0.0'; if (!empty($config['snmpd']['bindip'])) { - if (is_ipaddr($config['snmpd']['bindip'])) { - $bind_to_ip = $config['snmpd']['bindip']; - } else { - $if = get_real_interface($config['snmpd']['bindip']); - $bind_to_ip_maybe = find_interface_ip($if); - if (is_ipaddr($bind_to_ip_maybe)) { - $bind_to_ip = $bind_to_ip_maybe; - } + $bind_to_ip_maybe = find_interface_ip(get_real_interface($config['snmpd']['bindip'])); + if (is_ipaddr($bind_to_ip_maybe)) { + $bind_to_ip = $bind_to_ip_maybe; } } diff --git a/net-mgmt/snmp/src/www/services_snmp.php b/net-mgmt/snmp/src/www/services_snmp.php index 03bdf9f4b..4fef13680 100644 --- a/net-mgmt/snmp/src/www/services_snmp.php +++ b/net-mgmt/snmp/src/www/services_snmp.php @@ -327,14 +327,11 @@ include("head.inc");