]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ipset: Check IPSET_ATTR_PORT only once
authorSergey Popovich <popovich_sergei@mail.ua>
Sat, 2 May 2015 17:28:10 +0000 (19:28 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 13 May 2015 11:25:46 +0000 (13:25 +0200)
commit42479405be2fd7f7a419adfef7575fe36e425033
tree69edaa01e5da4cc464a50561e1dad8fc24fa0f9b
parentaf2bd14da02cd402218397f92b956e64e70f806e
netfilter: ipset: Check IPSET_ATTR_PORT only once

We do not need to check tb[IPSET_ATTR_PORT] != NULL before
retrieving port, as this attribute is known to exist due to
ip_set_attr_netorder() returning true only when attribute
exists and it is in network byte order.

Signed-off-by: Sergey Popovich <popovich_sergei@mail.ua>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipset/ip_set_hash_ipport.c
net/netfilter/ipset/ip_set_hash_ipportip.c
net/netfilter/ipset/ip_set_hash_ipportnet.c
net/netfilter/ipset/ip_set_hash_netport.c
net/netfilter/ipset/ip_set_hash_netportnet.c