]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ipset: Check CIDR value only when attribute is given
authorSergey Popovich <popovich_sergei@mail.ua>
Fri, 12 Jun 2015 19:30:57 +0000 (21:30 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sun, 14 Jun 2015 08:40:14 +0000 (10:40 +0200)
commitd8b6c0e5e2c07cfec73b3f3738bbbc1b04ccdf64
treeb967141fc9a101defd0f18d5089996bc7d02c317
parentb775ce04c63da7468e13a2558cb4f33d5ca9df3f
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>
net/netfilter/ipset/ip_set_hash_net.c
net/netfilter/ipset/ip_set_hash_netiface.c
net/netfilter/ipset/ip_set_hash_netnet.c
net/netfilter/ipset/ip_set_hash_netportnet.c