diff options
author | ae <ae@FreeBSD.org> | 2013-04-09 07:11:22 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2013-04-09 07:11:22 +0000 |
commit | 844d612b2ac90320a94987519d82dca04334da1e (patch) | |
tree | a37444a753245c5a506d831125e8ba84425b9fc6 /sys/netinet6/ip6_forward.c | |
parent | 11842319432af11ae4828f76bb503310ea1780a6 (diff) | |
download | FreeBSD-src-844d612b2ac90320a94987519d82dca04334da1e.zip FreeBSD-src-844d612b2ac90320a94987519d82dca04334da1e.tar.gz |
Use IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats.
MFC after: 1 week
Diffstat (limited to 'sys/netinet6/ip6_forward.c')
-rw-r--r-- | sys/netinet6/ip6_forward.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index 6bdf55a..686fd4b 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -135,7 +135,7 @@ ip6_forward(struct mbuf *m, int srcrt) if ((m->m_flags & (M_BCAST|M_MCAST)) != 0 || IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) { - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); /* XXX in6_ifstat_inc(rt->rt_ifp, ifs6_in_discard) */ if (V_ip6_log_time + V_ip6_log_interval < time_second) { V_ip6_log_time = time_second; @@ -183,7 +183,7 @@ ip6_forward(struct mbuf *m, int srcrt) IP_FORWARDING, &error); if (sp == NULL) { V_ipsec6stat.out_inval++; - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); if (mcopy) { #if 0 /* XXX: what icmp ? */ @@ -204,7 +204,7 @@ ip6_forward(struct mbuf *m, int srcrt) * This packet is just discarded. */ V_ipsec6stat.out_polvio++; - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); KEY_FREESP(&sp); if (mcopy) { #if 0 @@ -226,7 +226,7 @@ ip6_forward(struct mbuf *m, int srcrt) if (sp->req == NULL) { /* XXX should be panic ? */ printf("ip6_forward: No IPsec request specified.\n"); - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); KEY_FREESP(&sp); if (mcopy) { #if 0 @@ -310,7 +310,7 @@ ip6_forward(struct mbuf *m, int srcrt) /* don't show these error codes to the user */ break; } - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); if (mcopy) { #if 0 /* XXX: what icmp ? */ @@ -362,7 +362,7 @@ again2: if (rin6.ro_rt != NULL) RT_UNLOCK(rin6.ro_rt); else { - V_ip6stat.ip6s_noroute++; + IP6STAT_INC(ip6s_noroute); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_noroute); if (mcopy) { icmp6_error(mcopy, ICMP6_DST_UNREACH, @@ -387,13 +387,13 @@ skip_routing: src_in6 = ip6->ip6_src; if (in6_setscope(&src_in6, rt->rt_ifp, &outzone)) { /* XXX: this should not happen */ - V_ip6stat.ip6s_cantforward++; - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_cantforward); + IP6STAT_INC(ip6s_badscope); goto bad; } if (in6_setscope(&src_in6, m->m_pkthdr.rcvif, &inzone)) { - V_ip6stat.ip6s_cantforward++; - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_cantforward); + IP6STAT_INC(ip6s_badscope); goto bad; } if (inzone != outzone @@ -401,8 +401,8 @@ skip_routing: && !ipsecrt #endif ) { - V_ip6stat.ip6s_cantforward++; - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_cantforward); + IP6STAT_INC(ip6s_badscope); in6_ifstat_inc(rt->rt_ifp, ifs6_in_discard); if (V_ip6_log_time + V_ip6_log_interval < time_second) { @@ -432,8 +432,8 @@ skip_routing: if (in6_setscope(&dst_in6, m->m_pkthdr.rcvif, &inzone) != 0 || in6_setscope(&dst_in6, rt->rt_ifp, &outzone) != 0 || inzone != outzone) { - V_ip6stat.ip6s_cantforward++; - V_ip6stat.ip6s_badscope++; + IP6STAT_INC(ip6s_cantforward); + IP6STAT_INC(ip6s_badscope); goto bad; } @@ -623,12 +623,12 @@ pass: error = nd6_output(rt->rt_ifp, origifp, m, dst, rt); if (error) { in6_ifstat_inc(rt->rt_ifp, ifs6_out_discard); - V_ip6stat.ip6s_cantforward++; + IP6STAT_INC(ip6s_cantforward); } else { - V_ip6stat.ip6s_forward++; + IP6STAT_INC(ip6s_forward); in6_ifstat_inc(rt->rt_ifp, ifs6_out_forward); if (type) - V_ip6stat.ip6s_redirectsent++; + IP6STAT_INC(ip6s_redirectsent); else { if (mcopy) goto freecopy; |