X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=config%2Fcfgroot%2Fgeneral-functions.pl;h=605556718f96aa1a0df4d03c1fa9052bcd27c17a;hp=602617361bbae69b69ae80e1b5e954640bc8dab9;hb=290007b3b07ef6bc69bc97d54825fcf96eeb9eb6;hpb=52d08bcbd2b5da9fbd3f002c6b686a0202e6fffe diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index 602617361..605556718 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -383,13 +383,13 @@ sub validipandmask if ($ccdip=~/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/ &&(($1>0 && $1<=255 && $2>=0 && $2<=255 && $3>=0 && $3<=255 && $4<=255 ))) { #Subnet in decimal and valid? if ($ccdsubnet=~/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/ &&(($1<=255 && $2<=$1 && $3<=$2 && $4<=$3 ))) { - for (my $i=8;$i<=30;$i++){ + for (my $i=8;$i<=32;$i++){ if (&General::cidrtosub($i) eq $ccdsubnet){ return 1; } } #Subnet already in binary format? - }elsif ($ccdsubnet=~/^(\d{1,2})$/ && (($1<=30 && $1>=8))){ + }elsif ($ccdsubnet=~/^(\d{1,2})$/ && (($1<=32 && $1>=8))){ return 1; }else{ return 0;