diff options
author | vanhu <vanhu@FreeBSD.org> | 2008-08-12 09:05:01 +0000 |
---|---|---|
committer | vanhu <vanhu@FreeBSD.org> | 2008-08-12 09:05:01 +0000 |
commit | 72791f9bc1200815a0f4674c7533c9add019613f (patch) | |
tree | bff7efdc5f8a70b1f3d1d6466499631b750014d3 /sys/netipsec/ipsec_output.c | |
parent | 0b389f773a9c8f3b051d4428ff2da0e0312ce140 (diff) | |
download | FreeBSD-src-72791f9bc1200815a0f4674c7533c9add019613f.zip FreeBSD-src-72791f9bc1200815a0f4674c7533c9add019613f.tar.gz |
Increase statistic counters for enc0 interface when enabled
and processing IPSec traffic.
Approved by: gnn (mentor)
MFC after: 1 week
Diffstat (limited to 'sys/netipsec/ipsec_output.c')
-rw-r--r-- | sys/netipsec/ipsec_output.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c index ea153d4..72840c2 100644 --- a/sys/netipsec/ipsec_output.c +++ b/sys/netipsec/ipsec_output.c @@ -82,6 +82,11 @@ #include <machine/in_cksum.h> +#ifdef DEV_ENC +#include <net/if_enc.h> +#endif + + int ipsec_process_done(struct mbuf *m, struct ipsecrequest *isr) { @@ -364,6 +369,9 @@ ipsec4_process_packet( sav = isr->sav; #ifdef DEV_ENC + encif->if_opackets++; + encif->if_obytes += m->m_pkthdr.len; + /* pass the mbuf to enc0 for bpf processing */ ipsec_bpf(m, sav, AF_INET, ENC_OUT|ENC_BEFORE); /* pass the mbuf to enc0 for packet filtering */ @@ -724,6 +732,9 @@ ipsec6_output_tunnel(struct ipsec_output_state *state, struct secpolicy *sp, int } #ifdef DEV_ENC + encif->if_opackets++; + encif->if_obytes += m->m_pkthdr.len; + /* pass the mbuf to enc0 for bpf processing */ ipsec_bpf(m, isr->sav, AF_INET6, ENC_OUT|ENC_BEFORE); /* pass the mbuf to enc0 for packet filtering */ |