diff options
-rw-r--r-- | sys/netinet/ip_ah.c | 5 | ||||
-rw-r--r-- | sys/netinet/ip_esp.c | 5 | ||||
-rw-r--r-- | sys/netinet/ipsec_input.c | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c index d5fb3c6fc5f..88e5f09e09c 100644 --- a/sys/netinet/ip_ah.c +++ b/sys/netinet/ip_ah.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ah.c,v 1.86 2006/12/13 09:01:59 itojun Exp $ */ +/* $OpenBSD: ip_ah.c,v 1.87 2006/12/15 09:32:30 otto Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -954,6 +954,9 @@ ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, #if NBPFILTER > 0 struct ifnet *ifn = &(encif[0].sc_if); + ifn->if_opackets++; + ifn->if_obytes += m->m_pkthdr.len; + if (ifn->if_bpf) { struct enchdr hdr; diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c index 51d60a12b60..a348c53960f 100644 --- a/sys/netinet/ip_esp.c +++ b/sys/netinet/ip_esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp.c,v 1.99 2006/09/21 11:10:52 otto Exp $ */ +/* $OpenBSD: ip_esp.c,v 1.100 2006/12/15 09:32:30 otto Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -740,6 +740,9 @@ esp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, #if NBPFILTER > 0 struct ifnet *ifn = &(encif[0].sc_if); + ifn->if_opackets++; + ifn->if_obytes += m->m_pkthdr.len; + if (ifn->if_bpf) { struct enchdr hdr; diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c index abdafdc066d..a9a5bc6a630 100644 --- a/sys/netinet/ipsec_input.c +++ b/sys/netinet/ipsec_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_input.c,v 1.81 2006/12/05 09:17:12 markus Exp $ */ +/* $OpenBSD: ipsec_input.c,v 1.82 2006/12/15 09:32:30 otto Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -571,6 +571,9 @@ ipsec_common_input_cb(struct mbuf *m, struct tdb *tdbp, int skip, int protoff, #if NBPFILTER > 0 bpfif = &encif[0].sc_if; + bpfif->if_ipackets++; + bpfif->if_ibytes += m->m_pkthdr.len; + if (bpfif->if_bpf) { struct enchdr hdr; |