From 68c4131bea92ef3bb80dc555d52cc63ed47244a2 Mon Sep 17 00:00:00 2001 From: glebius Date: Fri, 21 Jun 2013 06:36:26 +0000 Subject: Fix kmod_*stat_inc() after r249276. The incorrect code actually increased the pointer, not the memory it points to. In collaboration with: kib Reported & tested by: Ian FREISLICH Sponsored by: Nginx, Inc. --- sys/netinet/ip_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/netinet/ip_input.c') diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index f38c6fa..0268ebc 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -283,14 +283,14 @@ void kmod_ipstat_inc(int statnum) { - counter_u64_add((counter_u64_t )&V_ipstatp + statnum, 1); + counter_u64_add(*((counter_u64_t *)&V_ipstatp + statnum), 1); } void kmod_ipstat_dec(int statnum) { - counter_u64_add((counter_u64_t )&V_ipstatp + statnum, -1); + counter_u64_add(*((counter_u64_t *)&V_ipstatp + statnum), -1); } static int -- cgit v1.1