From: Leo-Andres Hofmann Date: Thu, 18 Feb 2021 14:30:16 +0000 (+0100) Subject: zoneconf.cgi: Add default value for STP and require input X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=01139abbe14407b47910fee3835258aef2fc6dd3;p=people%2Fms%2Fipfire-2.x.git zoneconf.cgi: Add default value for STP and require input Signed-off-by: Leo-Andres Hofmann Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/zoneconf.cgi b/html/cgi-bin/zoneconf.cgi index 9d01d06cee..b90ea8a41f 100644 --- a/html/cgi-bin/zoneconf.cgi +++ b/html/cgi-bin/zoneconf.cgi @@ -478,7 +478,7 @@ END if ($access_selected{"NONE"} eq "") { $highlight = $_; } - + print < - + END ; @@ -513,6 +513,9 @@ foreach (@zones) { # load settings and prepare form elements for each zone my $stp_available = $ethsettings{"${uc}_MODE"} eq "bridge"; # STP is only available in bridge mode my $stp_enabled = $ethsettings{"${uc}_STP"} eq "on"; my $stp_priority = $ethsettings{"${uc}_STP_PRIORITY"}; + + # set priority to default value if no numerical value is configured + $stp_priority = 32768 unless looks_like_number($stp_priority); # form element modifiers my $checked = ""; @@ -532,7 +535,7 @@ END # priority input box HTML my $row_2 = < - + END ;