projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7f478e
)
Handle rules with no counts yet
author
Jamie Cameron
<jcameron@webmin.com>
Thu, 28 Feb 2008 18:25:44 +0000
(18:25 +0000)
committer
Jamie Cameron
<jcameron@webmin.com>
Thu, 28 Feb 2008 18:25:44 +0000
(18:25 +0000)
bandwidth/bandwidth-lib.pl
patch
|
blob
|
history
diff --git
a/bandwidth/bandwidth-lib.pl
b/bandwidth/bandwidth-lib.pl
index
b8de839
..
0375b6e
100644
(file)
--- a/
bandwidth/bandwidth-lib.pl
+++ b/
bandwidth/bandwidth-lib.pl
@@
-463,7
+463,7
@@
sub pre_ipfw_process
&foreign_require("ipfw", "ipfw-lib.pl");
local $active = &ipfw::get_config("$ipfw::config{'ipfw'} show |", \$out);
local $rule = &find_ipfw_rule($active, $config{'iface'});
-if ($rule) {
+if ($rule
&& $rule->{'count1'}
) {
$average_packet_size = $rule->{'count2'} / $rule->{'count1'};
system("$ipfw::config{'ipfw'} zero $rule->{'num'} >/dev/null 2>&1");
}