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/netipsec/ipsec_output.c | |
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/netipsec/ipsec_output.c')
-rw-r--r-- | sys/netipsec/ipsec_output.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c index 33054c0..6871f12 100644 --- a/sys/netipsec/ipsec_output.c +++ b/sys/netipsec/ipsec_output.c @@ -164,7 +164,7 @@ ipsec_process_done(struct mbuf *m, struct ipsecrequest *isr) * doing further processing. */ if (isr->next) { - V_ipsec4stat.ips_out_bundlesa++; + IPSECSTAT_INC(ips_out_bundlesa); /* XXX-BZ currently only support same AF bundles. */ switch (saidx->dst.sa.sa_family) { #ifdef INET @@ -356,7 +356,7 @@ again: * this packet because it is responsibility for * upper layer to retransmit the packet. */ - V_ipsec4stat.ips_out_nosa++; + IPSECSTAT_INC(ips_out_nosa); goto bad; } sav = isr->sav; @@ -827,14 +827,14 @@ ipsec6_output_tunnel(struct ipsec_output_state *state, struct secpolicy *sp, int ipseclog((LOG_ERR, "%s: family mismatched between " "inner and outer, spi=%u\n", __func__, ntohl(isr->sav->spi))); - V_ipsec6stat.ips_out_inval++; + IPSEC6STAT_INC(ips_out_inval); error = EAFNOSUPPORT; goto bad; } m = ipsec6_splithdr(m); if (!m) { - V_ipsec6stat.ips_out_nomem++; + IPSEC6STAT_INC(ips_out_nomem); error = ENOMEM; goto bad; } @@ -864,7 +864,7 @@ ipsec6_output_tunnel(struct ipsec_output_state *state, struct secpolicy *sp, int } if (state->ro->ro_rt == NULL) { IP6STAT_INC(ip6s_noroute); - V_ipsec6stat.ips_out_noroute++; + IPSEC6STAT_INC(ips_out_noroute); error = EHOSTUNREACH; goto bad; } @@ -876,7 +876,7 @@ ipsec6_output_tunnel(struct ipsec_output_state *state, struct secpolicy *sp, int m = ipsec6_splithdr(m); if (!m) { - V_ipsec6stat.ips_out_nomem++; + IPSEC6STAT_INC(ips_out_nomem); error = ENOMEM; goto bad; } |