diff options
author | ae <ae@FreeBSD.org> | 2013-06-20 09:55:53 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2013-06-20 09:55:53 +0000 |
commit | 1e4c88cc8b89f670f8e6f11dd0db6d4cc0f53c16 (patch) | |
tree | a157f9c42f0efea665bf8a24f6e83ac24e7980a3 /sys/netinet6 | |
parent | 10da02bc8d0c85c86d78640dee43641acfc687aa (diff) | |
download | FreeBSD-src-1e4c88cc8b89f670f8e6f11dd0db6d4cc0f53c16.zip FreeBSD-src-1e4c88cc8b89f670f8e6f11dd0db6d4cc0f53c16.tar.gz |
Use IPSECSTAT_INC() and IPSEC6STAT_INC() macros for ipsec statistics
accounting.
MFC after: 2 weeks
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ip6_forward.c | 6 | ||||
-rw-r--r-- | sys/netinet6/raw_ip6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/udp6_usrreq.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index 686fd4b..ed62a23 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -120,7 +120,7 @@ ip6_forward(struct mbuf *m, int srcrt) * before forwarding packet actually. */ if (ipsec6_in_reject(m, NULL)) { - V_ipsec6stat.in_polvio++; + IPSEC6STAT_INC(in_polvio); m_freem(m); return; } @@ -182,7 +182,7 @@ ip6_forward(struct mbuf *m, int srcrt) sp = ipsec_getpolicybyaddr(m, IPSEC_DIR_OUTBOUND, IP_FORWARDING, &error); if (sp == NULL) { - V_ipsec6stat.out_inval++; + IPSEC6STAT_INC(out_inval); IP6STAT_INC(ip6s_cantforward); if (mcopy) { #if 0 @@ -203,7 +203,7 @@ ip6_forward(struct mbuf *m, int srcrt) /* * This packet is just discarded. */ - V_ipsec6stat.out_polvio++; + IPSEC6STAT_INC(out_polvio); IP6STAT_INC(ip6s_cantforward); KEY_FREESP(&sp); if (mcopy) { diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 31eeb61..841d711 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -263,7 +263,7 @@ rip6_input(struct mbuf **mp, int *offp, int proto) */ if (n && ipsec6_in_reject(n, last)) { m_freem(n); - V_ipsec6stat.in_polvio++; + IPSEC6STAT_INC(in_polvio); /* Do not inject data into pcb. */ } else #endif /* IPSEC */ @@ -295,7 +295,7 @@ rip6_input(struct mbuf **mp, int *offp, int proto) */ if ((last != NULL) && ipsec6_in_reject(m, last)) { m_freem(m); - V_ipsec6stat.in_polvio++; + IPSEC6STAT_INC(in_polvio); IP6STAT_DEC(ip6s_delivered); /* Do not inject data into pcb. */ INP_RUNLOCK(last); diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 200fd68..1f0d52c 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -141,7 +141,7 @@ udp6_append(struct inpcb *inp, struct mbuf *n, int off, /* Check AH/ESP integrity. */ if (ipsec6_in_reject(n, inp)) { m_freem(n); - V_ipsec6stat.in_polvio++; + IPSEC6STAT_INC(in_polvio); return; } #endif /* IPSEC */ |