From: Michael Tremer Date: Mon, 6 Apr 2020 17:38:38 +0000 (+0000) Subject: zoneconf.cgi: Skip checks for non-existing zones X-Git-Tag: v2.25-core143~14 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=bb90622c2cfdd7b3bbbabcdbba8a573a36d9edc1 zoneconf.cgi: Skip checks for non-existing zones On systems with RED on PPP and no BLUE or ORANGE zones, there would always be an error when handling non-existant input. Signed-off-by: Michael Tremer Signed-off-by: Arne Fitzenreiter --- diff --git a/html/cgi-bin/zoneconf.cgi b/html/cgi-bin/zoneconf.cgi index 6b86428181..d99a3e611d 100644 --- a/html/cgi-bin/zoneconf.cgi +++ b/html/cgi-bin/zoneconf.cgi @@ -211,6 +211,8 @@ if ($cgiparams{"ACTION"} eq $Lang::tr{"save"}) { my $mac = $_->[0]; my $nic_access = $cgiparams{"ACCESS $uc $mac"}; + next unless ($nic_access); + if ($nic_access ne "NONE") { if ($VALIDATE_nic_check{"RESTRICT $mac"}) { # If this interface is already assigned to RED in PPP mode, throw an error $VALIDATE_error = $Lang::tr{"zoneconf val ppp assignment error"};