]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: xt_iprange: Incorrect xt_iprange boundary check for IPv6
authorThomas Jacob <jacob@internet24.de>
Mon, 24 Jan 2011 20:35:36 +0000 (21:35 +0100)
committerPatrick McHardy <kaber@trash.net>
Mon, 24 Jan 2011 20:35:36 +0000 (21:35 +0100)
commit9e567aecfb55e23d248e0dee7075d5ae2397d246
treebda499516fd0fc9c045a17b9e14251acd84ae330
parenta6584f47db272ff27ce7c80c1dd059f5d270764a
netfilter: xt_iprange: Incorrect xt_iprange boundary check for IPv6

iprange_ipv6_sub was substracting 2 unsigned ints and then casting
the result to int to find out whether they are lt, eq or gt each
other, this doesn't work if the full 32 bits of each part
can be used in IPv6 addresses. Patch should remedy that without
significant performance penalties. Also number of ntohl
calls can be reduced this way (Jozsef Kadlecsik).

Signed-off-by: Thomas Jacob <jacob@internet24.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/xt_iprange.c