mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/snmp: kill get_possible_listen_ips() use
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -327,14 +327,11 @@ include("head.inc");
|
||||
<td>
|
||||
<select name="bindip" class="selectpicker">
|
||||
<option value=""><?= gettext('All') ?></option>
|
||||
<?php
|
||||
foreach (get_possible_listen_ips() as $lip):?>
|
||||
|
||||
<option value="<?=$lip['value'];?>" <?=$lip['value'] == $pconfig['bindip'] ? "selected=\"selected\"" : "";?>>
|
||||
<?=htmlspecialchars($lip['name']);?>
|
||||
<?php foreach (get_configured_interface_with_descr() as $ifname => $ifdescr): ?>
|
||||
<option value="<?= html_safe($ifname) ?>" <?= $ifname == $pconfig['bindip'] ? 'selected="selected"' : '' ?>>
|
||||
<?= htmlspecialchars($ifdescr) ?>
|
||||
</option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user