From 692f8aa2fac966ef1adc29843ad741d355db1ecd Mon Sep 17 00:00:00 2001 From: rwatson Date: Sat, 11 Apr 2009 23:35:20 +0000 Subject: Update stats in struct ipstat using four new macros, IPSTAT_ADD(), IPSTAT_INC(), IPSTAT_SUB(), and IPSTAT_DEC(), rather than directly manipulating the fields across the kernel. This will make it easier to change the implementation of these statistics, such as using per-CPU versions of the data structures. MFC after: 3 days --- sys/netinet/ip_options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/netinet/ip_options.c') diff --git a/sys/netinet/ip_options.c b/sys/netinet/ip_options.c index 74d54f2..dbb7d81 100644 --- a/sys/netinet/ip_options.c +++ b/sys/netinet/ip_options.c @@ -218,7 +218,7 @@ nosourcerouting: #ifdef IPSTEALTH dropit: #endif - V_ipstat.ips_cantforward++; + IPSTAT_INC(ips_cantforward); m_freem(m); return (1); } @@ -366,7 +366,7 @@ dropit: return (0); bad: icmp_error(m, type, code, 0, 0); - V_ipstat.ips_badoptions++; + IPSTAT_INC(ips_badoptions); return (1); } -- cgit v1.1