From: Jamie Cameron Date: Fri, 21 Oct 2011 22:44:47 +0000 (-0700) Subject: Set address before checking for clash X-Git-Url: https://iam.tj/gitweb/gitweb.cgi?p=webmin.git;a=commitdiff_plain;h=ca93c866edbeb2e849b792ac35adf6d8d22d0d66 Set address before checking for clash --- diff --git a/net/save_aifc.cgi b/net/save_aifc.cgi index 5a0a7e87..e9246576 100755 --- a/net/save_aifc.cgi +++ b/net/save_aifc.cgi @@ -77,6 +77,11 @@ else { &error($text{'aifc_ename'}); } + # Validate and store inputs + &check_ipaddress_any($in{'address'}) || + &error(&text('aifc_eip', $in{'address'})); + $a->{'address'} = $in{'address'}; + # Check for address clash $allow_clash = defined(&allow_interface_clash) ? &allow_interface_clash($a, 0) : 1; @@ -86,11 +91,6 @@ else { $clash && &error(&text('aifc_eclash', $clash->{'fullname'})); } - # Validate and store inputs - &check_ipaddress_any($in{'address'}) || - &error(&text('aifc_eip', $in{'address'})); - $a->{'address'} = $in{'address'}; - if ($virtual_netmask && $a->{'virtual'} ne "") { # Always use this netmask for virtuals $a->{'netmask'} = $virtual_netmask;