X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Fqos.cgi;h=de732842ca429d780f0ab93a8f4c60a727140a76;hb=30d80ed42a716aa35c5827a4ec513e2925638da9;hp=300e6ae4515604170898a717bcadb37fa27c31ac;hpb=92d75b2ed53e72427beab0dbda8f06577d42e4c5;p=people%2Fteissler%2Fipfire-2.x.git diff --git a/html/cgi-bin/qos.cgi b/html/cgi-bin/qos.cgi index 300e6ae45..de732842c 100644 --- a/html/cgi-bin/qos.cgi +++ b/html/cgi-bin/qos.cgi @@ -73,8 +73,6 @@ $qossettings{'DEF_INC_SPD'} = ''; $qossettings{'DEFCLASS_INC'} = ''; $qossettings{'DEFCLASS_OUT'} = ''; $qossettings{'ACK'} = ''; -$qossettings{'MTU'} = '1492'; -$qossettings{'QLENGTH'} = '1000'; $qossettings{'RED_DEV'} = 'ppp0'; $qossettings{'IMQ_DEV'} = 'imq0'; $qossettings{'VALID'} = 'yes'; @@ -499,20 +497,21 @@ elsif ($qossettings{'ACTION'} eq $Lang::tr{'save'}) } elsif ($qossettings{'ACTION'} eq $Lang::tr{'template'} ) { - my @UP; - #print "UP
"; - for(my $i = 1; $i <= 10; $i++) { - $UP[$i] = int($qossettings{'OUT_SPD'} / $i ); - #print $i."=".$UP[$i]." "; - } - my @DOWN; - #print "

Down
"; - for(my $i = 1; $i <= 20; $i++) { - $DOWN[$i] = int($qossettings{'INC_SPD'} / $i); - #print $i."=".$DOWN[$i]." "; - } - open( FILE, "> $classfile" ) or die "Unable to write $classfile"; - print FILE < 0) && ($qossettings{'INC_SPD'} > 0)) { + my @UP; + #print "UP
"; + for(my $i = 1; $i <= 10; $i++) { + $UP[$i] = int($qossettings{'OUT_SPD'} / $i ); + #print $i."=".$UP[$i]." "; + } + my @DOWN; + #print "

Down
"; + for(my $i = 1; $i <= 20; $i++) { + $DOWN[$i] = int($qossettings{'INC_SPD'} / $i); + #print $i."=".$DOWN[$i]." "; + } + open( FILE, "> $classfile" ) or die "Unable to write $classfile"; + print FILE < $level7file" ) or die "Unable to write $level7file"; - print FILE < $level7file" ) or die "Unable to write $level7file"; + print FILE < $portfile" ) or die "Unable to write $portfile"; - print FILE < $portfile" ) or die "Unable to write $portfile"; + print FILE </dev/null 2>&1"); + system("/usr/bin/touch /var/ipfire/qos/enable"); + system("/usr/local/bin/qosctrl start >/dev/null 2>&1"); + system("logger -t ipfire 'QoS started'"); + } else { + $message = $Lang::tr{'qos enter bandwidths'}; } - $qossettings{'DEFCLASS_INC'} = "210"; - $qossettings{'DEFCLASS_OUT'} = "110"; - $qossettings{'ACK'} ="101"; - $qossettings{'ENABLED'} = 'on'; - &General::writehash("${General::swroot}/qos/settings", \%qossettings); - system("/usr/local/bin/qosctrl generate >/dev/null 2>&1"); - system("/usr/bin/touch /var/ipfire/qos/enable"); - system("/usr/local/bin/qosctrl start >/dev/null 2>&1"); - system("logger -t ipfire 'QoS started'"); } elsif ($qossettings{'ACTION'} eq $Lang::tr{'status'} ) { @@ -659,13 +661,6 @@ END &Header::closepage(); exit } -elsif ($qossettings{'ACTION'} eq "$Lang::tr{'urlfilter advanced settings'}" ) -{ - &expert(); - &Header::closebigbox(); - &Header::closepage(); - exit -} if ($qossettings{'ACTIONBW'} eq "$Lang::tr{'modify'}" ) { &changebandwidth(); @@ -749,11 +744,11 @@ END
- -
- - -
+ +
+ + +
END ; @@ -1435,26 +1430,6 @@ END } } } - -sub expert -{ - &Header::openbox('100%', 'center', $Lang::tr{'expertoptions'}); - print < - -
MTU: - - $Lang::tr{'mtu QoS'} -
$Lang::tr{'Queuelenght'}: - - -
- -END -; - &Header::closebox(); -} - sub validminbwdth { if ( $qossettings{'VALID'} eq 'yes' ) { if ( $qossettings{'DEVICE'} eq $qossettings{'RED_DEV'} ) {