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.
This commit is contained in:
parent
036beed93a
commit
42a253e6a1
@ -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
|
||||
|
@ -309,7 +309,7 @@ void
|
||||
kmod_tcpstat_inc(int statnum)
|
||||
{
|
||||
|
||||
counter_u64_add((counter_u64_t )&V_tcpstatp + statnum, 1);
|
||||
counter_u64_add(*((counter_u64_t *)&V_tcpstatp + statnum), 1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user