From 5ec0c413d18c95ae16f42e46c43a303c511c9743 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Tue, 1 Jan 2008 07:09:39 +0000 Subject: [PATCH] Use count instead of allow for ipfw --- bandwidth/bandwidth-lib.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bandwidth/bandwidth-lib.pl b/bandwidth/bandwidth-lib.pl index 23d06d45e..b8de839c7 100644 --- a/bandwidth/bandwidth-lib.pl +++ b/bandwidth/bandwidth-lib.pl @@ -412,7 +412,7 @@ if (!$rule) { if (@$rules && $rules->[0]->{'num'} < 100) { $num = int($rules->[0]->{'num'} / 2); } - $rule = { 'action' => 'allow', + $rule = { 'action' => 'count', 'log' => 1, 'proto' => 'all', 'from' => 'any', @@ -446,7 +446,8 @@ return undef; # find_ipfw_rule(&rules, iface) sub find_ipfw_rule { -local ($rule) = grep { $_->{'action'} eq 'allow' && +local ($rule) = grep { ($_->{'action'} eq 'allow' || + $_->{'action'} eq 'count') && $_->{'log'} && ($_->{'proto'} eq 'all' || $_->{'proto'} eq 'ip') && $_->{'from'} eq 'any' &&