mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
QoS: Don't create template when bandwidth is empty.
This commit is contained in:
@@ -5,6 +5,7 @@ WARNING: translation string unused: HDD temperature
|
||||
WARNING: translation string unused: Level7 rule
|
||||
WARNING: translation string unused: Local VPN IP
|
||||
WARNING: translation string unused: Ping
|
||||
WARNING: translation string unused: Queuelenght
|
||||
WARNING: translation string unused: Remote IP
|
||||
WARNING: translation string unused: Remote VPN IP
|
||||
WARNING: translation string unused: Resolv
|
||||
@@ -146,6 +147,7 @@ WARNING: translation string unused: err rs 8 untar
|
||||
WARNING: translation string unused: error config
|
||||
WARNING: translation string unused: error external access
|
||||
WARNING: translation string unused: expected
|
||||
WARNING: translation string unused: expertoptions
|
||||
WARNING: translation string unused: exportkey
|
||||
WARNING: translation string unused: external access rule changed
|
||||
WARNING: translation string unused: extrahd unable to read
|
||||
@@ -257,6 +259,7 @@ WARNING: translation string unused: monthly volume
|
||||
WARNING: translation string unused: monthly volume start day
|
||||
WARNING: translation string unused: monthly volume start day short
|
||||
WARNING: translation string unused: mount
|
||||
WARNING: translation string unused: mtu QoS
|
||||
WARNING: translation string unused: nat-traversal
|
||||
WARNING: translation string unused: net address
|
||||
WARNING: translation string unused: net config type
|
||||
|
||||
@@ -5,6 +5,7 @@ WARNING: translation string unused: HDD temperature
|
||||
WARNING: translation string unused: Level7 rule
|
||||
WARNING: translation string unused: Local VPN IP
|
||||
WARNING: translation string unused: Ping
|
||||
WARNING: translation string unused: Queuelenght
|
||||
WARNING: translation string unused: Remote IP
|
||||
WARNING: translation string unused: Remote VPN IP
|
||||
WARNING: translation string unused: Resolv
|
||||
@@ -169,6 +170,7 @@ WARNING: translation string unused: err rs 8 untar
|
||||
WARNING: translation string unused: error config
|
||||
WARNING: translation string unused: error external access
|
||||
WARNING: translation string unused: expected
|
||||
WARNING: translation string unused: expertoptions
|
||||
WARNING: translation string unused: exportkey
|
||||
WARNING: translation string unused: external access rule changed
|
||||
WARNING: translation string unused: extrahd unable to read
|
||||
@@ -283,6 +285,7 @@ WARNING: translation string unused: monthly volume
|
||||
WARNING: translation string unused: monthly volume start day
|
||||
WARNING: translation string unused: monthly volume start day short
|
||||
WARNING: translation string unused: mount
|
||||
WARNING: translation string unused: mtu QoS
|
||||
WARNING: translation string unused: nat-traversal
|
||||
WARNING: translation string unused: net address
|
||||
WARNING: translation string unused: net config type
|
||||
|
||||
@@ -5,6 +5,7 @@ WARNING: translation string unused: HDD temperature
|
||||
WARNING: translation string unused: Level7 rule
|
||||
WARNING: translation string unused: Local VPN IP
|
||||
WARNING: translation string unused: Ping
|
||||
WARNING: translation string unused: Queuelenght
|
||||
WARNING: translation string unused: Remote IP
|
||||
WARNING: translation string unused: Remote VPN IP
|
||||
WARNING: translation string unused: Resolv
|
||||
@@ -167,6 +168,7 @@ WARNING: translation string unused: err rs 8 untar
|
||||
WARNING: translation string unused: error config
|
||||
WARNING: translation string unused: error external access
|
||||
WARNING: translation string unused: expected
|
||||
WARNING: translation string unused: expertoptions
|
||||
WARNING: translation string unused: exportkey
|
||||
WARNING: translation string unused: external access rule changed
|
||||
WARNING: translation string unused: extrahd unable to read
|
||||
@@ -281,6 +283,7 @@ WARNING: translation string unused: monthly volume
|
||||
WARNING: translation string unused: monthly volume start day
|
||||
WARNING: translation string unused: monthly volume start day short
|
||||
WARNING: translation string unused: mount
|
||||
WARNING: translation string unused: mtu QoS
|
||||
WARNING: translation string unused: nat-traversal
|
||||
WARNING: translation string unused: net address
|
||||
WARNING: translation string unused: net config type
|
||||
@@ -604,6 +607,7 @@ WARNING: untranslated string: proxy reports daily
|
||||
WARNING: untranslated string: proxy reports monthly
|
||||
WARNING: untranslated string: proxy reports today
|
||||
WARNING: untranslated string: proxy reports weekly
|
||||
WARNING: untranslated string: qos enter bandwidths
|
||||
WARNING: untranslated string: route config changed
|
||||
WARNING: untranslated string: routing config added
|
||||
WARNING: untranslated string: routing config changed
|
||||
|
||||
@@ -5,6 +5,7 @@ WARNING: translation string unused: HDD temperature
|
||||
WARNING: translation string unused: Level7 rule
|
||||
WARNING: translation string unused: Local VPN IP
|
||||
WARNING: translation string unused: Ping
|
||||
WARNING: translation string unused: Queuelenght
|
||||
WARNING: translation string unused: Remote IP
|
||||
WARNING: translation string unused: Remote VPN IP
|
||||
WARNING: translation string unused: Resolv
|
||||
@@ -167,6 +168,7 @@ WARNING: translation string unused: err rs 8 untar
|
||||
WARNING: translation string unused: error config
|
||||
WARNING: translation string unused: error external access
|
||||
WARNING: translation string unused: expected
|
||||
WARNING: translation string unused: expertoptions
|
||||
WARNING: translation string unused: exportkey
|
||||
WARNING: translation string unused: external access rule changed
|
||||
WARNING: translation string unused: extrahd unable to read
|
||||
@@ -281,6 +283,7 @@ WARNING: translation string unused: monthly volume
|
||||
WARNING: translation string unused: monthly volume start day
|
||||
WARNING: translation string unused: monthly volume start day short
|
||||
WARNING: translation string unused: mount
|
||||
WARNING: translation string unused: mtu QoS
|
||||
WARNING: translation string unused: nat-traversal
|
||||
WARNING: translation string unused: net address
|
||||
WARNING: translation string unused: net config type
|
||||
@@ -588,6 +591,7 @@ WARNING: untranslated string: proxy reports daily
|
||||
WARNING: untranslated string: proxy reports monthly
|
||||
WARNING: untranslated string: proxy reports today
|
||||
WARNING: untranslated string: proxy reports weekly
|
||||
WARNING: untranslated string: qos enter bandwidths
|
||||
WARNING: untranslated string: route config changed
|
||||
WARNING: untranslated string: routing config added
|
||||
WARNING: untranslated string: routing config changed
|
||||
|
||||
@@ -5,6 +5,7 @@ WARNING: translation string unused: HDD temperature
|
||||
WARNING: translation string unused: Level7 rule
|
||||
WARNING: translation string unused: Local VPN IP
|
||||
WARNING: translation string unused: Ping
|
||||
WARNING: translation string unused: Queuelenght
|
||||
WARNING: translation string unused: Remote IP
|
||||
WARNING: translation string unused: Remote VPN IP
|
||||
WARNING: translation string unused: Resolv
|
||||
@@ -169,6 +170,7 @@ WARNING: translation string unused: err rs 8 untar
|
||||
WARNING: translation string unused: error config
|
||||
WARNING: translation string unused: error external access
|
||||
WARNING: translation string unused: expected
|
||||
WARNING: translation string unused: expertoptions
|
||||
WARNING: translation string unused: exportkey
|
||||
WARNING: translation string unused: external access rule changed
|
||||
WARNING: translation string unused: extrahd unable to read
|
||||
@@ -283,6 +285,7 @@ WARNING: translation string unused: monthly volume
|
||||
WARNING: translation string unused: monthly volume start day
|
||||
WARNING: translation string unused: monthly volume start day short
|
||||
WARNING: translation string unused: mount
|
||||
WARNING: translation string unused: mtu QoS
|
||||
WARNING: translation string unused: nat-traversal
|
||||
WARNING: translation string unused: net address
|
||||
WARNING: translation string unused: net config type
|
||||
@@ -508,6 +511,7 @@ WARNING: untranslated string: bytes
|
||||
WARNING: untranslated string: ccd iroute2
|
||||
WARNING: untranslated string: new
|
||||
WARNING: untranslated string: outgoing firewall reserved groupname
|
||||
WARNING: untranslated string: qos enter bandwidths
|
||||
WARNING: untranslated string: route config changed
|
||||
WARNING: untranslated string: routing config added
|
||||
WARNING: untranslated string: routing config changed
|
||||
|
||||
@@ -5,6 +5,7 @@ WARNING: translation string unused: HDD temperature
|
||||
WARNING: translation string unused: Level7 rule
|
||||
WARNING: translation string unused: Local VPN IP
|
||||
WARNING: translation string unused: Ping
|
||||
WARNING: translation string unused: Queuelenght
|
||||
WARNING: translation string unused: Remote IP
|
||||
WARNING: translation string unused: Remote VPN IP
|
||||
WARNING: translation string unused: Resolv
|
||||
@@ -167,6 +168,7 @@ WARNING: translation string unused: err rs 8 untar
|
||||
WARNING: translation string unused: error config
|
||||
WARNING: translation string unused: error external access
|
||||
WARNING: translation string unused: expected
|
||||
WARNING: translation string unused: expertoptions
|
||||
WARNING: translation string unused: exportkey
|
||||
WARNING: translation string unused: external access rule changed
|
||||
WARNING: translation string unused: extrahd unable to read
|
||||
@@ -281,6 +283,7 @@ WARNING: translation string unused: monthly volume
|
||||
WARNING: translation string unused: monthly volume start day
|
||||
WARNING: translation string unused: monthly volume start day short
|
||||
WARNING: translation string unused: mount
|
||||
WARNING: translation string unused: mtu QoS
|
||||
WARNING: translation string unused: nat-traversal
|
||||
WARNING: translation string unused: net address
|
||||
WARNING: translation string unused: net config type
|
||||
@@ -604,6 +607,7 @@ WARNING: untranslated string: proxy reports daily
|
||||
WARNING: untranslated string: proxy reports monthly
|
||||
WARNING: untranslated string: proxy reports today
|
||||
WARNING: untranslated string: proxy reports weekly
|
||||
WARNING: untranslated string: qos enter bandwidths
|
||||
WARNING: untranslated string: route config changed
|
||||
WARNING: untranslated string: routing config added
|
||||
WARNING: untranslated string: routing config changed
|
||||
|
||||
@@ -5,6 +5,7 @@ WARNING: translation string unused: HDD temperature
|
||||
WARNING: translation string unused: Level7 rule
|
||||
WARNING: translation string unused: Local VPN IP
|
||||
WARNING: translation string unused: Ping
|
||||
WARNING: translation string unused: Queuelenght
|
||||
WARNING: translation string unused: Remote IP
|
||||
WARNING: translation string unused: Remote VPN IP
|
||||
WARNING: translation string unused: Resolv
|
||||
@@ -166,6 +167,7 @@ WARNING: translation string unused: err rs 8 untar
|
||||
WARNING: translation string unused: error config
|
||||
WARNING: translation string unused: error external access
|
||||
WARNING: translation string unused: expected
|
||||
WARNING: translation string unused: expertoptions
|
||||
WARNING: translation string unused: exportkey
|
||||
WARNING: translation string unused: external access rule changed
|
||||
WARNING: translation string unused: filename
|
||||
@@ -275,6 +277,7 @@ WARNING: translation string unused: monthly volume
|
||||
WARNING: translation string unused: monthly volume start day
|
||||
WARNING: translation string unused: monthly volume start day short
|
||||
WARNING: translation string unused: mount
|
||||
WARNING: translation string unused: mtu QoS
|
||||
WARNING: translation string unused: nat-traversal
|
||||
WARNING: translation string unused: net address
|
||||
WARNING: translation string unused: net config type
|
||||
@@ -569,6 +572,7 @@ WARNING: untranslated string: proxy reports daily
|
||||
WARNING: untranslated string: proxy reports monthly
|
||||
WARNING: untranslated string: proxy reports today
|
||||
WARNING: untranslated string: proxy reports weekly
|
||||
WARNING: untranslated string: qos enter bandwidths
|
||||
WARNING: untranslated string: route config changed
|
||||
WARNING: untranslated string: routing config added
|
||||
WARNING: untranslated string: routing config changed
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
< proxy reports monthly
|
||||
< proxy reports today
|
||||
< proxy reports weekly
|
||||
< qos enter bandwidths
|
||||
< server restart
|
||||
< snort working
|
||||
< static routes
|
||||
@@ -236,6 +237,7 @@
|
||||
< proxy reports monthly
|
||||
< proxy reports today
|
||||
< proxy reports weekly
|
||||
< qos enter bandwidths
|
||||
< server restart
|
||||
< Set time on boot
|
||||
< static routes
|
||||
@@ -328,6 +330,7 @@
|
||||
< proxy reports monthly
|
||||
< proxy reports today
|
||||
< proxy reports weekly
|
||||
< qos enter bandwidths
|
||||
< server restart
|
||||
< static routes
|
||||
< visit us at
|
||||
@@ -423,6 +426,7 @@
|
||||
< proxy reports monthly
|
||||
< proxy reports today
|
||||
< proxy reports weekly
|
||||
< qos enter bandwidths
|
||||
< server restart
|
||||
< static routes
|
||||
< visit us at
|
||||
|
||||
@@ -497,20 +497,21 @@ elsif ($qossettings{'ACTION'} eq $Lang::tr{'save'})
|
||||
}
|
||||
elsif ($qossettings{'ACTION'} eq $Lang::tr{'template'} )
|
||||
{
|
||||
my @UP;
|
||||
#print "UP<br />";
|
||||
for(my $i = 1; $i <= 10; $i++) {
|
||||
$UP[$i] = int($qossettings{'OUT_SPD'} / $i );
|
||||
#print $i."=".$UP[$i]." ";
|
||||
}
|
||||
my @DOWN;
|
||||
#print "<br /><br />Down<br />";
|
||||
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 <<END
|
||||
if (($qossettings{'OUT_SPD'} > 0) && ($qossettings{'INC_SPD'} > 0)) {
|
||||
my @UP;
|
||||
#print "UP<br />";
|
||||
for(my $i = 1; $i <= 10; $i++) {
|
||||
$UP[$i] = int($qossettings{'OUT_SPD'} / $i );
|
||||
#print $i."=".$UP[$i]." ";
|
||||
}
|
||||
my @DOWN;
|
||||
#print "<br /><br />Down<br />";
|
||||
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 <<END
|
||||
imq0;200;1;$DOWN[10];$DOWN[1];;;8;VoIP;
|
||||
imq0;203;4;$DOWN[20];$DOWN[1];;;0;VPN;
|
||||
imq0;204;5;$DOWN[20];$DOWN[1];;;8;Webtraffic;
|
||||
@@ -524,9 +525,9 @@ $qossettings{'RED_DEV'};120;7;1;$UP[1];;;1;P2P;
|
||||
$qossettings{'RED_DEV'};103;4;$UP[2];$UP[1];;;2;VPN;
|
||||
END
|
||||
;
|
||||
close FILE;
|
||||
open( FILE, "> $level7file" ) or die "Unable to write $level7file";
|
||||
print FILE <<END
|
||||
close FILE;
|
||||
open( FILE, "> $level7file" ) or die "Unable to write $level7file";
|
||||
print FILE <<END
|
||||
102;$qossettings{'RED_DEV'};dns;;;
|
||||
102;$qossettings{'RED_DEV'};rtp;;;
|
||||
102;$qossettings{'RED_DEV'};skypetoskype;;;
|
||||
@@ -548,9 +549,9 @@ END
|
||||
220;imq0;bittorrent;;;
|
||||
END
|
||||
;
|
||||
close FILE;
|
||||
open( FILE, "> $portfile" ) or die "Unable to write $portfile";
|
||||
print FILE <<END
|
||||
close FILE;
|
||||
open( FILE, "> $portfile" ) or die "Unable to write $portfile";
|
||||
print FILE <<END
|
||||
101;$qossettings{'RED_DEV'};icmp;;;;;
|
||||
102;$qossettings{'RED_DEV'};tcp;;;;53;
|
||||
102;$qossettings{'RED_DEV'};udp;;;;53;
|
||||
@@ -573,22 +574,25 @@ END
|
||||
204;imq0;tcp;;80;;;
|
||||
END
|
||||
;
|
||||
close FILE;
|
||||
if ($qossettings{'DEF_INC_SPD'} eq '') {
|
||||
$qossettings{'DEF_INC_SPD'} = int($qossettings{'INC_SPD'} * 0.9);
|
||||
close FILE;
|
||||
if ($qossettings{'DEF_INC_SPD'} eq '') {
|
||||
$qossettings{'DEF_INC_SPD'} = int($qossettings{'INC_SPD'} * 0.9);
|
||||
}
|
||||
if ($qossettings{'DEF_OUT_SPD'} eq '') {
|
||||
$qossettings{'DEF_OUT_SPD'} = int($qossettings{'OUT_SPD'} * 0.9);
|
||||
}
|
||||
$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'");
|
||||
} else {
|
||||
$message = $Lang::tr{'qos enter bandwidths'};
|
||||
}
|
||||
if ($qossettings{'DEF_OUT_SPD'} eq '') {
|
||||
$qossettings{'DEF_OUT_SPD'} = int($qossettings{'OUT_SPD'} * 0.9);
|
||||
}
|
||||
$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'} )
|
||||
{
|
||||
|
||||
@@ -1523,6 +1523,7 @@
|
||||
'psk' => 'PSK',
|
||||
'pulse' => 'Puls',
|
||||
'pulse dial' => 'Pulswahl:',
|
||||
'qos enter bandwidths' => 'Bitte geben Sie ihre Downstream- und Upstream-Bandbreite an!',
|
||||
'qos graphs' => 'Qos Diagramme',
|
||||
'qos warning' => 'Die Regel <strong>muss</strong> wieder gespeichert werden, ansonsten wird sie verworfen!',
|
||||
'quick playlist' => 'Quick Playlist',
|
||||
|
||||
@@ -1551,6 +1551,7 @@
|
||||
'pulse' => 'Pulse',
|
||||
'pulse dial' => 'Pulse dial:',
|
||||
'qos add subclass' => 'Add subclass',
|
||||
'qos enter bandwidths' => 'You will need to enter your downstream and upstream bandwidth!',
|
||||
'qos graphs' => 'Qos Graphs',
|
||||
'qos warning' => 'The rule <strong>must</strong> be saved, otherwise it will be discarded!',
|
||||
'quick control' => 'Quick Control',
|
||||
|
||||
Reference in New Issue
Block a user