]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/netfilter/ipset/ip_set_getport.h
netfilter: ipset: fix address ranges at hash:*port* types
[mv-sheeva.git] / include / linux / netfilter / ipset / ip_set_getport.h
index 3882a81a3b3c8547cbf77354b88868586218dc60..5aebd170f899f76b9f3231d3aaf5c1066c73870a 100644 (file)
@@ -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*/