diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2017-02-05 16:04:15 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2017-02-05 16:04:15 +0000 |
commit | a0fe76973a89628bbcd7a93577076e67e111a4a4 (patch) | |
tree | 627e4d024b0b67aff06231ec1d2f58ae6f4b8a80 /sys/netinet | |
parent | daf9ee77f00685cfb1100181f3ecec6af00c6ee1 (diff) |
Use percpu counters for ip6stat
Try to follow the existing examples. Some notes:
- don't implement counters_dec() yet, which could be used in two
similar chunks of code. Let's see if there are more users first.
- stop incrementing IPv6-specific mbuf stats, IPv4 has no equivalent.
Input from mpi@, ok bluhm@ mpi@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ipsec_input.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c index c5952707aaa..188b21885ca 100644 --- a/sys/netinet/ipsec_input.c +++ b/sys/netinet/ipsec_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_input.c,v 1.141 2017/01/29 19:58:47 bluhm Exp $ */ +/* $OpenBSD: ipsec_input.c,v 1.142 2017/02/05 16:04:14 jca Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -985,7 +985,7 @@ ah6_input_cb(struct mbuf *m, int off, int protoff) */ while (nxt != IPPROTO_DONE) { if (ip6_hdrnestlimit && (++nest > ip6_hdrnestlimit)) { - ip6stat.ip6s_toomanyhdr++; + ip6stat_inc(ip6s_toomanyhdr); goto bad; } @@ -994,7 +994,7 @@ ah6_input_cb(struct mbuf *m, int off, int protoff) * more sanity checks in header chain processing. */ if (m->m_pkthdr.len < off) { - ip6stat.ip6s_tooshort++; + ip6stat_inc(ip6s_tooshort); goto bad; } nxt = (*inet6sw[ip6_protox[nxt]].pr_input)(&m, &off, nxt); |