summaryrefslogtreecommitdiff
path: root/drivers/isdn/hisax/jade_irq.c
diff options
context:
space:
mode:
authorOliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>2013-09-16 22:30:57 +0400
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2013-09-16 22:36:09 +0400
commit2cf55125c64d64cc106e204d53b107094762dfdf (patch)
tree01562dc48e3acb3bc021dc2930180fedfefb8c77 /drivers/isdn/hisax/jade_irq.c
parent169faa2e19478b02027df04582ec7543dba1dd16 (diff)
downloadlinux-2cf55125c64d64cc106e204d53b107094762dfdf.tar.xz
netfilter: ipset: Fix serious failure in CIDR tracking
This fixes a serious bug affecting all hash types with a net element - specifically, if a CIDR value is deleted such that none of the same size exist any more, all larger (less-specific) values will then fail to match. Adding back any prefix with a CIDR equal to or more specific than the one deleted will fix it. Steps to reproduce: ipset -N test hash:net ipset -A test 1.1.0.0/16 ipset -A test 2.2.2.0/24 ipset -T test 1.1.1.1 #1.1.1.1 IS in set ipset -D test 2.2.2.0/24 ipset -T test 1.1.1.1 #1.1.1.1 IS NOT in set This is due to the fact that the nets counter was unconditionally decremented prior to the iteration that shifts up the entries. Now, we first check if there is a proceeding entry and if not, decrement it and return. Otherwise, we proceed to iterate and then zero the last element, which, in most cases, will already be zero. Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa> Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Diffstat (limited to 'drivers/isdn/hisax/jade_irq.c')
0 files changed, 0 insertions, 0 deletions