diff options
author | green <green@FreeBSD.org> | 1999-08-28 07:20:59 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 1999-08-28 07:20:59 +0000 |
commit | 6b6009ffecf6ac596045df26ddab1ca807e856d3 (patch) | |
tree | 9247f60a35c0a53e039091212a6b1dc7a4b8c186 /sys/netinet/ip_fw.c | |
parent | c4b74a17645de412877876912ccea4ee68573486 (diff) | |
download | FreeBSD-src-6b6009ffecf6ac596045df26ddab1ca807e856d3.zip FreeBSD-src-6b6009ffecf6ac596045df26ddab1ca807e856d3.tar.gz |
Also make the "other" packets counter resettable.
Diffstat (limited to 'sys/netinet/ip_fw.c')
-rw-r--r-- | sys/netinet/ip_fw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c index 49e03c3..4bfdc8b 100644 --- a/sys/netinet/ip_fw.c +++ b/sys/netinet/ip_fw.c @@ -74,6 +74,8 @@ static int fw_verbose_limit = IPFIREWALL_VERBOSE_LIMIT; static int fw_verbose_limit = 0; #endif +static u_int64_t counter; /* counter for ipfw_report(NULL...) */ + #define IPFW_DEFAULT_RULE ((u_int)(u_short)~0) LIST_HEAD (ip_fw_head, ip_fw_chain) ip_fw_chain; @@ -300,7 +302,6 @@ ipfw_report(struct ip_fw *f, struct ip *ip, struct ifnet *rif, struct ifnet *oif) { if (ip) { - static u_int64_t counter; struct tcphdr *const tcp = (struct tcphdr *) ((u_int32_t *) ip+ ip->ip_hl); struct udphdr *const udp = (struct udphdr *) ((u_int32_t *) ip+ ip->ip_hl); struct icmp *const icmp = (struct icmp *) ((u_int32_t *) ip + ip->ip_hl); @@ -1158,6 +1159,7 @@ resetlog_entry(struct ip_fw *frwl) if (frwl == 0) { s = splnet(); + counter = 0; for (fcp = LIST_FIRST(&ip_fw_chain); fcp; fcp = LIST_NEXT(fcp, chain)) fcp->rule->fw_loghighest = fcp->rule->fw_pcnt + fcp->rule->fw_logamount; |