From 808c680c88aba2c55736b30d0d0e86c247978ca5 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Fri, 18 Mar 2011 17:21:20 +0100 Subject: hash:ip,port* types with IPv4 The hash:ip,port* types with IPv4 silently ignored when address ranges with non TCP/UDP were added/deleted from the set and the first address from the range was only used. --- kernel/include/linux/netfilter/ipset/ip_set_getport.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'kernel/include/linux/netfilter') diff --git a/kernel/include/linux/netfilter/ipset/ip_set_getport.h b/kernel/include/linux/netfilter/ipset/ip_set_getport.h index 3882a81..5aebd17 100644 --- a/kernel/include/linux/netfilter/ipset/ip_set_getport.h +++ b/kernel/include/linux/netfilter/ipset/ip_set_getport.h @@ -18,4 +18,14 @@ static inline bool ip_set_get_ip6_port(const struct sk_buff *skb, bool src, extern bool ip_set_get_ip_port(const struct sk_buff *skb, u8 pf, bool src, __be16 *port); +static inline bool ip_set_proto_with_ports(u8 proto) +{ + switch (proto) { + case IPPROTO_TCP: + case IPPROTO_UDP: + return true; + } + return false; +} + #endif /*_IP_SET_GETPORT_H*/ -- cgit v1.2.3