diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1994-11-16 10:17:11 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1994-11-16 10:17:11 +0000 |
| commit | 63f8d699ac9791a6cbf48d2b43c2847fc8dd9730 (patch) | |
| tree | fe6126b4eeffefa1c2cbe50fa4bb9bebcc17fdf4 /sys/netinet/ip_input.c | |
| parent | f3ac09ee9a8675459d6d0c6fb58058a10a3d3e90 (diff) | |
Notes
Diffstat (limited to 'sys/netinet/ip_input.c')
| -rw-r--r-- | sys/netinet/ip_input.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index fd7eab658d80..085d0ff2d7af 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 - * $Id: ip_input.c,v 1.9 1994/10/28 15:09:48 jkh Exp $ + * $Id: ip_input.c,v 1.10 1994/11/08 12:47:29 jkh Exp $ */ #include <sys/param.h> @@ -59,6 +59,9 @@ #ifdef IPFIREWALL #include <netinet/ip_fw.h> #endif +#ifdef IPACCT +#include <netinet/ip_fw.h> +#endif #include <sys/socketvar.h> struct socket *ip_rsvpd; @@ -353,6 +356,17 @@ next: ours: +#ifdef IPACCT + /* + * If packet came to us we count it... + * This way we count all incoming packets which has + * not been forwarded... + * Do not convert ip_len to host byte order when + * counting,ppl already made it for us before.. + */ + ip_acct_cnt(ip,ip_acct_chain,0); +#endif + /* * If offset or IP_MF are set, must reassemble. * Otherwise, nothing need be done. @@ -1125,6 +1139,11 @@ ip_forward(m, srcrt) if (error) ipstat.ips_cantforward++; else { +#ifdef wrong +#ifdef IPACCT + ip_acct_cnt(ip,ip_acct_chain); +#endif +#endif ipstat.ips_forward++; if (type) ipstat.ips_redirectsent++; |
