Skip to content

Commit

Permalink
netfilter: xt_quota: fix incomplete initialization
Browse files Browse the repository at this point in the history
Commit v2.6.29-rc5-872-gacc738f ("xtables: avoid pointer to self")
forgot to copy the initial quota value supplied by iptables into the
private structure, thus counting from whatever was in the memory
kmalloc returned.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Jan Engelhardt authored and Patrick McHardy committed Jun 22, 2009
1 parent 2495561 commit 6d62182
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/netfilter/xt_quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ static bool quota_mt_check(const struct xt_mtchk_param *par)
if (q->master == NULL)
return -ENOMEM;

q->master->quota = q->quota;
return true;
}

Expand Down

0 comments on commit 6d62182

Please sign in to comment.