]> git.ipfire.org Git - thirdparty/ipset.git/commit
netfilter: ipset: Check CIDR value only when attribute is given
authorSergey Popovich <popovich_sergei@mail.ua>
Mon, 17 Nov 2014 16:45:10 +0000 (18:45 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Fri, 20 Mar 2015 18:16:45 +0000 (19:16 +0100)
commit4c54de30906e8a048211d43bfcdeeab52617378c
tree4a6c5ba494dd3c2927a9d198d2693b5697646606
parent1ea77bdaa53b396366ec50062298fabf70130ad2
netfilter: ipset: Check CIDR value only when attribute is given

There is no reason to check CIDR value regardless attribute
specifying CIDR is given.

Initialize cidr array in element structure on element structure
declaration to let more freedom to the compiler to optimize
initialization right before element structure is used.

Remove local variables cidr and cidr2 for netnet and netportnet
hashes as we do not use packed cidr value for such set types and
can store value directly in e.cidr[].

Signed-off-by: Sergey Popovich <popovich_sergei@mail.ua>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
kernel/net/netfilter/ipset/ip_set_hash_net.c
kernel/net/netfilter/ipset/ip_set_hash_netiface.c
kernel/net/netfilter/ipset/ip_set_hash_netnet.c
kernel/net/netfilter/ipset/ip_set_hash_netportnet.c