summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/ipsec.c
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2013-06-20 09:55:53 +0000
committerae <ae@FreeBSD.org>2013-06-20 09:55:53 +0000
commit1e4c88cc8b89f670f8e6f11dd0db6d4cc0f53c16 (patch)
treea157f9c42f0efea665bf8a24f6e83ac24e7980a3 /sys/netipsec/ipsec.c
parent10da02bc8d0c85c86d78640dee43641acfc687aa (diff)
downloadFreeBSD-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.c')
-rw-r--r--sys/netipsec/ipsec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c
index 6b41f51..e9e5f74 100644
--- a/sys/netipsec/ipsec.c
+++ b/sys/netipsec/ipsec.c
@@ -454,7 +454,7 @@ ipsec4_checkpolicy(struct mbuf *m, u_int dir, u_int flag, int *error,
sp = ipsec_getpolicybysock(m, dir, inp, error);
if (sp == NULL) {
IPSEC_ASSERT(*error != 0, ("getpolicy failed w/o error"));
- V_ipsec4stat.ips_out_inval++;
+ IPSECSTAT_INC(ips_out_inval);
return (NULL);
}
IPSEC_ASSERT(*error == 0, ("sp w/ error set to %u", *error));
@@ -464,7 +464,7 @@ ipsec4_checkpolicy(struct mbuf *m, u_int dir, u_int flag, int *error,
printf("%s: invalid policy %u\n", __func__, sp->policy);
/* FALLTHROUGH */
case IPSEC_POLICY_DISCARD:
- V_ipsec4stat.ips_out_polvio++;
+ IPSECSTAT_INC(ips_out_polvio);
*error = -EINVAL; /* Packet is discarded by caller. */
break;
case IPSEC_POLICY_BYPASS:
@@ -1314,7 +1314,7 @@ ipsec4_in_reject(struct mbuf *m, struct inpcb *inp)
result = ipsec46_in_reject(m, inp);
if (result)
- V_ipsec4stat.ips_in_polvio++;
+ IPSECSTAT_INC(ips_in_polvio);
return (result);
}
@@ -1332,7 +1332,7 @@ ipsec6_in_reject(struct mbuf *m, struct inpcb *inp)
result = ipsec46_in_reject(m, inp);
if (result)
- V_ipsec6stat.ips_in_polvio++;
+ IPSEC6STAT_INC(ips_in_polvio);
return (result);
}
OpenPOWER on IntegriCloud