diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-03-18 17:21:20 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-03-18 17:21:20 +0100 |
commit | 808c680c88aba2c55736b30d0d0e86c247978ca5 (patch) | |
tree | b82fb9096d39aa1d1fca7f26cadf5c591c415564 /kernel/include/linux | |
parent | 033a882864ea2cfcb39937c214c2f74685a6b7ac (diff) |
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.
Diffstat (limited to 'kernel/include/linux')
-rw-r--r-- | kernel/include/linux/netfilter/ipset/ip_set_getport.h | 10 |
1 files changed, 10 insertions, 0 deletions
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*/ |