From 1e4c88cc8b89f670f8e6f11dd0db6d4cc0f53c16 Mon Sep 17 00:00:00 2001 From: ae Date: Thu, 20 Jun 2013 09:55:53 +0000 Subject: Use IPSECSTAT_INC() and IPSEC6STAT_INC() macros for ipsec statistics accounting. MFC after: 2 weeks --- sys/netipsec/ipsec_output.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/netipsec/ipsec_output.c') 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; } -- cgit v1.1