X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fqos.cgi;h=b7af11204ebd29c9cf20145e5e0c84e76cd3d567;hp=8b96731dd1a0a46787d7da74a867e4e21823ed75;hb=39155be80547e808e859f8f4dcd93763876bff5f;hpb=6d3c8250fe1e6ef297d01bcc7a19672adfff70e6 diff --git a/html/cgi-bin/qos.cgi b/html/cgi-bin/qos.cgi index 8b96731dd1..b7af11204e 100644 --- a/html/cgi-bin/qos.cgi +++ b/html/cgi-bin/qos.cgi @@ -251,13 +251,13 @@ END if ($qossettings{'DOLEVEL7'} eq $Lang::tr{'save'}) { if ( $qossettings{'QIP'} ne '' ) { - unless ( &General::validip($qossettings{'QIP'}) ) { + if ((!&General::validipandmask($qossettings{'QIP'})) && (!&General::validip($qossettings{'QIP'}))) { $qossettings{'VALID'} = 'no'; $message = $Lang::tr{'The source IP address is invalid.'}; } } if ( $qossettings{'DIP'} ne '' ) { - unless ( &General::validip($qossettings{'DIP'}) ) { + if ((!&General::validipandmask($qossettings{'DIP'})) && (!&General::validip($qossettings{'DIP'}))) { $qossettings{'VALID'} = 'no'; $message = $Lang::tr{'The destination IP address is invalid.'}; } @@ -326,15 +326,15 @@ END if ($qossettings{'DOPORT'} eq $Lang::tr{'save'}) { if ( $qossettings{'QIP'} ne '' ) { - unless ( &General::validip($qossettings{'QIP'}) ) { + if ((!&General::validipandmask($qossettings{'QIP'})) && (!&General::validip($qossettings{'QIP'}))) { $qossettings{'VALID'} = 'no'; - $message = "$Lang::tr{'The source IP address is invalid.'}"; + $message = $Lang::tr{'The source IP address is invalid.'}; } } if ( $qossettings{'DIP'} ne '' ) { - unless ( &General::validip($qossettings{'DIP'}) ) { + if ((!&General::validipandmask($qossettings{'DIP'})) && (!&General::validip($qossettings{'DIP'}))) { $qossettings{'VALID'} = 'no'; - $message = "$Lang::tr{'The destination IP address is invalid.'}"; + $message = $Lang::tr{'The destination IP address is invalid.'}; } } if ($qossettings{'CLASS'} >= 100 && $qossettings{'CLASS'} < 121) { @@ -463,18 +463,16 @@ if ($qossettings{'ACTION'} eq $Lang::tr{'start'}) $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{'stop'}) { - system("/usr/local/bin/qosctrl stop >/dev/null 2>&1"); - unlink "/var/ipfire/qos/bin/qos.sh"; - unlink "/var/ipfire/qos/enable"; - system("logger -t ipfire 'QoS stopped'"); $qossettings{'ENABLED'} = 'off'; &General::writehash("${General::swroot}/qos/settings", \%qossettings); + system("/usr/local/bin/qosctrl stop >/dev/null 2>&1"); + system("/usr/local/bin/qosctrl generate >/dev/null 2>&1"); + system("logger -t ipfire 'QoS stopped'"); } elsif ($qossettings{'ACTION'} eq $Lang::tr{'restart'}) { @@ -512,17 +510,17 @@ elsif ($qossettings{'ACTION'} eq $Lang::tr{'template'} ) } open( FILE, "> $classfile" ) or die "Unable to write $classfile"; 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 { @@ -772,11 +769,11 @@ if ( ($qossettings{'DEFCLASS_INC'} eq '') || ($qossettings{'DEFCLASS_OUT'} eq '' exit } - &Header::openbox('100%', 'center', "$qossettings{'RED_DEV'} $Lang::tr{'graph'}"); - &Graphs::makegraphbox("qos.cgi",$qossettings{'RED_DEV'},"hour","325"); + &Header::openbox('100%', 'center', "$qossettings{'RED_DEV'} $Lang::tr{'graph'}, $Lang::tr{'uplink'}"); + &Graphs::makegraphbox("qos.cgi",$qossettings{'RED_DEV'},"hour"); &Header::closebox(); - &Header::openbox('100%', 'center', "$qossettings{'IMQ_DEV'} $Lang::tr{'graph'}"); - &Graphs::makegraphbox("qos.cgi",$qossettings{'IMQ_DEV'},"hour","325"); + &Header::openbox('100%', 'center', "$qossettings{'IMQ_DEV'} $Lang::tr{'graph'}, $Lang::tr{'downlink'}"); + &Graphs::makegraphbox("qos.cgi",$qossettings{'IMQ_DEV'},"hour"); &Header::closebox(); &showclasses($qossettings{'RED_DEV'}); @@ -938,7 +935,7 @@ END $Lang::tr{'guaranteed bandwith'}:   - $Lang::tr{'max bandwith'}: + $Lang::tr{'max bandwith'} *:   Burst: @@ -960,8 +957,8 @@ print <$Lang::tr{'min costs'} (1)   $Lang::tr{'remark'}: - -   + + * $Lang::tr{'required field'}     @@ -1079,10 +1076,10 @@ END print <  $Lang::tr{'source ip'}: - +   $Lang::tr{'destination ip'}: - + $Lang::tr{'qos warning'} @@ -1123,10 +1120,10 @@ END   $Lang::tr{'source ip'}: - +   $Lang::tr{'destination ip'}: - + END @@ -1184,7 +1181,7 @@ sub showclasses { @classline = split( /\;/, $classentry ); if ( $classline[0] eq $qossettings{'DEV'} ) { - &Header::openbox('100%', 'center', "$Lang::tr{'Class'}: $classline[1]"); + &Header::openbox('100%', 'center', "$Lang::tr{'Class'}: $classline[1] $classline[8]"); print < $Lang::tr{'interface'} @@ -1209,22 +1206,22 @@ sub showclasses {
- +
- +
- +
- +
@@ -1249,13 +1246,13 @@ END - +
- +
END @@ -1314,7 +1311,7 @@ END - +
@@ -1324,7 +1321,7 @@ END - +
END @@ -1372,14 +1369,14 @@ END - +
- +
END @@ -1407,17 +1404,17 @@ END
- +
- +
- +
END