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/netinet | |
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/netinet')
-rw-r--r-- | sys/netinet/tcp_input.c | 4 | ||||
-rw-r--r-- | sys/netinet/udp_usrreq.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 25b320e..e773d46 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -950,12 +950,12 @@ findpcb: #ifdef IPSEC #ifdef INET6 if (isipv6 && ipsec6_in_reject(m, inp)) { - V_ipsec6stat.in_polvio++; + IPSEC6STAT_INC(in_polvio); goto dropunlock; } else #endif /* INET6 */ if (ipsec4_in_reject(m, inp) != 0) { - V_ipsec4stat.in_polvio++; + IPSECSTAT_INC(in_polvio); goto dropunlock; } #endif /* IPSEC */ diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index b6297dc..6bc94c3 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -279,7 +279,7 @@ udp_append(struct inpcb *inp, struct ip *ip, struct mbuf *n, int off, /* Check AH/ESP integrity. */ if (ipsec4_in_reject(n, inp)) { m_freem(n); - V_ipsec4stat.in_polvio++; + IPSECSTAT_INC(in_polvio); return; } #ifdef IPSEC_NAT_T @@ -1291,7 +1291,7 @@ udp4_espdecap(struct inpcb *inp, struct mbuf *m, int off) if (minlen > m->m_pkthdr.len) minlen = m->m_pkthdr.len; if ((m = m_pullup(m, minlen)) == NULL) { - V_ipsec4stat.in_inval++; + IPSECSTAT_INC(in_inval); return (NULL); /* Bypass caller processing. */ } data = mtod(m, caddr_t); /* Points to ip header. */ @@ -1331,7 +1331,7 @@ udp4_espdecap(struct inpcb *inp, struct mbuf *m, int off) uint32_t spi; if (payload <= sizeof(struct esp)) { - V_ipsec4stat.in_inval++; + IPSECSTAT_INC(in_inval); m_freem(m); return (NULL); /* Discard. */ } @@ -1352,7 +1352,7 @@ udp4_espdecap(struct inpcb *inp, struct mbuf *m, int off) tag = m_tag_get(PACKET_TAG_IPSEC_NAT_T_PORTS, 2 * sizeof(uint16_t), M_NOWAIT); if (tag == NULL) { - V_ipsec4stat.in_nomem++; + IPSECSTAT_INC(in_nomem); m_freem(m); return (NULL); /* Discard. */ } |