From: Alexander Marx Date: Tue, 10 Jan 2017 13:12:27 +0000 (+0100) Subject: BUG11278: Cleanup function for network check X-Git-Tag: v2.19-core109^2~27 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=4f857eea41e1e5cce0bd7a48f1e0d6bafc33cb7e BUG11278: Cleanup function for network check Deleted some code which is also used in another function Signed-off-by: Alexander Marx Signed-off-by: Michael Tremer --- diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index 298e68c5a4..188bb7f8b6 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -540,13 +540,9 @@ sub checksubnets return $errormessage; } } - - #check if we use one of ipfire's networks (green,orange,blue) - &readhash("${General::swroot}/ethernet/settings", \%ownnet); - if (($ownnet{'GREEN_NETADDRESS'} ne '' && $ownnet{'GREEN_NETADDRESS'} ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'GREEN_NETADDRESS'},&iporsubtodec($ownnet{'GREEN_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err green'};return $errormessage;} - if (($ownnet{'ORANGE_NETADDRESS'} ne '' && $ownnet{'ORANGE_NETADDRESS'} ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'ORANGE_NETADDRESS'},&iporsubtodec($ownnet{'ORANGE_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err orange'};return $errormessage;} - if (($ownnet{'BLUE_NETADDRESS'} ne '' && $ownnet{'BLUE_NETADDRESS'} ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'BLUE_NETADDRESS'},&iporsubtodec($ownnet{'BLUE_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err blue'};return $errormessage;} - if (($ownnet{'RED_NETADDRESS'} ne '' && $ownnet{'RED_NETADDRESS'} ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'RED_NETADDRESS'},&iporsubtodec($ownnet{'RED_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err red'};return $errormessage;} + + #call check_net_internal + &General::check_net_internal($ccdnet); } sub check_net_internal{