diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-03-20 15:33:26 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2011-03-20 15:33:26 +0100 |
commit | 5e0c1eb7e6b61998c7ecd39b7f69a15773d894d4 (patch) | |
tree | 4fba9a1410925d0a6d7a8a39aa8cc447e6f9251c /include | |
parent | b26fa4e0275426450238a14158bc1db24bb696e6 (diff) |
netfilter: ipset: fix address ranges at hash:*port* types
The hash:*port* types with IPv4 silently ignored when address ranges
with non TCP/UDP were added/deleted from the set and used the first
address from the range only.
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter/ipset/ip_set_getport.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/netfilter/ipset/ip_set_getport.h b/include/linux/netfilter/ipset/ip_set_getport.h index 3882a81a3b3..5aebd170f89 100644 --- a/include/linux/netfilter/ipset/ip_set_getport.h +++ b/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*/ |