#914 initial implementation of silent_ports

This commit is contained in:
Oliver Gorwits
2022-08-15 22:26:38 +01:00
parent 7aca60a348
commit 6a27a2b3b1
3 changed files with 37 additions and 12 deletions

View File

@@ -192,12 +192,18 @@ elsif (ref [] eq ref setting('tacacs')) {
config->{'tacacs'} = [ @newservers ];
}
# support unordered dictionary as if it were a single item list
# support unordered dictionaries as if they were a single item list
if (ref {} eq ref setting('device_identity')) {
config->{'device_identity'} = [ setting('device_identity') ];
}
else { config->{'device_identity'} ||= [] }
if (ref {} eq ref setting('silent_ports')) {
config->{'silent_ports'} = [ setting('silent_ports') ];
}
else { config->{'silent_ports'} ||= [] }
# copy devices_no and devices_only into others
foreach my $name (qw/devices_no devices_only
discover_no macsuck_no arpnip_no nbtstat_no