]> 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)
commitcf63088e7d56b73d8091867343cc429160854a26
treeb967141fc9a101defd0f18d5089996bc7d02c317
parent6be1d3a938bba4ddde0cc7a0dae1bfd5c55e7d6d
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