summaryrefslogtreecommitdiff
path: root/sys/netinet6/nd6_nbr.c
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2017-02-09 15:23:36 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2017-02-09 15:23:36 +0000
commit93353c70e288507c5e9d747dfbf7efbe3a95d142 (patch)
tree573e583759a7b0c075819c2c7d2a292aaebbf650 /sys/netinet6/nd6_nbr.c
parent56f2e55e49aaf23d0837bf2acec5f2572233f640 (diff)
percpu counters for raw ipv6 and icmp6 stats
ok mpi@
Diffstat (limited to 'sys/netinet6/nd6_nbr.c')
-rw-r--r--sys/netinet6/nd6_nbr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index d937598bbca..fef9d7e0a93 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_nbr.c,v 1.114 2017/01/03 13:32:51 bluhm Exp $ */
+/* $OpenBSD: nd6_nbr.c,v 1.115 2017/02/09 15:23:35 jca Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@@ -118,7 +118,7 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len)
IP6_EXTHDR_GET(nd_ns, struct nd_neighbor_solicit *, m, off, icmp6len);
if (nd_ns == NULL) {
- icmp6stat.icp6s_tooshort++;
+ icmp6stat_inc(icp6s_tooshort);
if_put(ifp);
return;
}
@@ -339,7 +339,7 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len)
inet_ntop(AF_INET6, &daddr6, addr, sizeof(addr))));
nd6log((LOG_ERR, "nd6_ns_input: tgt=%s\n",
inet_ntop(AF_INET6, &taddr6, addr, sizeof(addr))));
- icmp6stat.icp6s_badns++;
+ icmp6stat_inc(icp6s_badns);
m_freem(m);
if_put(ifp);
}
@@ -532,7 +532,7 @@ nd6_ns_output(struct ifnet *ifp, struct in6_addr *daddr6,
m->m_pkthdr.csum_flags |= M_ICMP_CSUM_OUT;
ip6_output(m, NULL, NULL, dad ? IPV6_UNSPECSRC : 0, &im6o, NULL);
- icmp6stat.icp6s_outhist[ND_NEIGHBOR_SOLICIT]++;
+ icmp6stat_inc(icp6s_outhist + ND_NEIGHBOR_SOLICIT);
return;
bad:
@@ -589,7 +589,7 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len)
IP6_EXTHDR_GET(nd_na, struct nd_neighbor_advert *, m, off, icmp6len);
if (nd_na == NULL) {
- icmp6stat.icp6s_tooshort++;
+ icmp6stat_inc(icp6s_tooshort);
if_put(ifp);
return;
}
@@ -875,7 +875,7 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len)
return;
bad:
- icmp6stat.icp6s_badna++;
+ icmp6stat_inc(icp6s_badna);
m_freem(m);
if_put(ifp);
}
@@ -1037,7 +1037,7 @@ nd6_na_output(struct ifnet *ifp, struct in6_addr *daddr6,
m->m_pkthdr.csum_flags |= M_ICMP_CSUM_OUT;
ip6_output(m, NULL, NULL, 0, &im6o, NULL);
- icmp6stat.icp6s_outhist[ND_NEIGHBOR_ADVERT]++;
+ icmp6stat_inc(icp6s_outhist+ ND_NEIGHBOR_ADVERT);
return;
bad: