summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2013-06-21 06:36:26 +0000
committerglebius <glebius@FreeBSD.org>2013-06-21 06:36:26 +0000
commit68c4131bea92ef3bb80dc555d52cc63ed47244a2 (patch)
treea5a7aaeaf68000c02ac9ecb167c2a660c29b0015 /sys/netinet/ip_input.c
parent0b70fa91a829c786c4a55f1c2ca9ee6ed45f83db (diff)
downloadFreeBSD-src-68c4131bea92ef3bb80dc555d52cc63ed47244a2.zip
FreeBSD-src-68c4131bea92ef3bb80dc555d52cc63ed47244a2.tar.gz
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 <ianf clue.co.za> Sponsored by: Nginx, Inc.
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c4
1 files changed, 2 insertions, 2 deletions
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
OpenPOWER on IntegriCloud