From 43ce26ef3d55f8815c04f2a39c24f45f6aebc3a3 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Fri, 3 Sep 2021 21:17:11 +0100 Subject: [PATCH] Allow port_control_reasons setting to actually work --- Build.PL | 2 +- Changes | 6 ++++++ lib/App/Netdisco/Configuration.pm | 5 +++++ share/config.yml | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Build.PL b/Build.PL index 63d2ef8e..07c42601 100644 --- a/Build.PL +++ b/Build.PL @@ -82,7 +82,7 @@ Module::Build->new( 'Starman' => '0.4008', 'Storable' => '0', 'Sys::SigAction' => '0', - 'SNMP::Info' => '3.75', + 'SNMP::Info' => '3.76', 'SQL::Abstract' => '1.85', 'SQL::Translator' => '0.11024', 'Template' => '2.24', diff --git a/Changes b/Changes index 7a73a701..17b9416b 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,9 @@ +2.049004 - 2021-09-03 + + [BUG FIXES] + + * Allow port_control_reasons setting to actually work + 2.049003 - 2021-09-03 [ENHANCEMENTS] diff --git a/lib/App/Netdisco/Configuration.pm b/lib/App/Netdisco/Configuration.pm index 706aae0d..9d8158e8 100644 --- a/lib/App/Netdisco/Configuration.pm +++ b/lib/App/Netdisco/Configuration.pm @@ -136,6 +136,11 @@ if ($ENV{NETDISCO_DOMAIN}) { } } +# check user's port_control_reasons + +config->{'port_control_reasons'} = + config->{'port_control_reasons'} || config->{'system_port_control_reasons'}; + # convert domain_suffix from scalar or list to regexp config->{'domain_suffix'} = [setting('domain_suffix')] diff --git a/share/config.yml b/share/config.yml index ae854b97..c5c805dc 100644 --- a/share/config.yml +++ b/share/config.yml @@ -190,7 +190,7 @@ portctl_nowaps: false portctl_nophones: false portctl_vlans: false portctl_uplinks: false -port_control_reasons: +system_port_control_reasons: address: 'Address Allocation Abuse' copyright: 'Copyright Violation' dos: 'Denial of Service'