]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: xt_hashlimit: fix race that results in duplicated entries
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 24 Dec 2012 12:09:25 +0000 (13:09 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 26 Dec 2012 17:14:44 +0000 (18:14 +0100)
commitb8af24dd2ab914c3f6ad851522e5dc025f50f8c8
tree49d9df6bbf35300fa3a8d1e3c4f0cbbbe07a383e
parent54063daade5e6e57509f37fdebc2812b08c7bedf
netfilter: xt_hashlimit: fix race that results in duplicated entries

Two packets may race to create the same entry in the hashtable,
double check if this packet lost race. This double checking only
happens in the path of the packet that creates the hashtable for
first time.

Note that, with this patch, no packet drops occur if the race happens.

Reported-by: Feng Gao <gfree.wind@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_hashlimit.c