diff options
author | Jeremy Sowden <jeremy@azazel.net> | 2019-10-03 22:56:07 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-10-08 00:59:02 +0300 |
commit | f8615bf8a3dabd84bf844c6f888929495039d389 (patch) | |
tree | 26c2d92e5374edbcd36295bec9a0c2f678f7f145 /net/netfilter/ipset/ip_set_getport.c | |
parent | 3fbd6c4513b5c27465a1dcf2e4286e6c3183bb1f (diff) | |
download | linux-f8615bf8a3dabd84bf844c6f888929495039d389.tar.xz |
netfilter: ipset: move ip_set_get_ip_port() to ip_set_bitmap_port.c.
ip_set_get_ip_port() is only used in ip_set_bitmap_port.c. Move it
there and make it static.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Acked-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/ipset/ip_set_getport.c')
-rw-r--r-- | net/netfilter/ipset/ip_set_getport.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/net/netfilter/ipset/ip_set_getport.c b/net/netfilter/ipset/ip_set_getport.c index 2b8f959574b4..36615eb3eae1 100644 --- a/net/netfilter/ipset/ip_set_getport.c +++ b/net/netfilter/ipset/ip_set_getport.c @@ -148,31 +148,3 @@ ip_set_get_ip6_port(const struct sk_buff *skb, bool src, } EXPORT_SYMBOL_GPL(ip_set_get_ip6_port); #endif - -bool -ip_set_get_ip_port(const struct sk_buff *skb, u8 pf, bool src, __be16 *port) -{ - bool ret; - u8 proto; - - switch (pf) { - case NFPROTO_IPV4: - ret = ip_set_get_ip4_port(skb, src, port, &proto); - break; - case NFPROTO_IPV6: - ret = ip_set_get_ip6_port(skb, src, port, &proto); - break; - default: - return false; - } - if (!ret) - return ret; - switch (proto) { - case IPPROTO_TCP: - case IPPROTO_UDP: - return true; - default: - return false; - } -} -EXPORT_SYMBOL_GPL(ip_set_get_ip_port); |