diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/include/linux/netfilter/ipset/ip_set_getport.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/include/linux/netfilter/ipset/ip_set_getport.h b/kernel/include/linux/netfilter/ipset/ip_set_getport.h index 1597fa9..8be8ecf 100644 --- a/kernel/include/linux/netfilter/ipset/ip_set_getport.h +++ b/kernel/include/linux/netfilter/ipset/ip_set_getport.h @@ -77,7 +77,7 @@ get_ip4_port(const struct sk_buff *skb, bool src, u16 *port, u8 *proto) int protocol = iph->protocol; /* See comments at tcp_match in ip_tables.c */ - if (ntohs(iph->frag_off) & IP_OFFSET) + if (protocol <= 0 || (ntohs(iph->frag_off) & IP_OFFSET)) return false; return get_port(skb, protocol, protooff, src, port, proto); @@ -91,7 +91,7 @@ get_ip6_port(const struct sk_buff *skb, bool src, u16 *port, u8 *proto) unsigned short fragoff; protocol = ipv6_find_hdr(skb, &protooff, -1, &fragoff); - if (protocol < 0 || fragoff) + if (protocol <= 0 || fragoff) return false; return get_port(skb, protocol, protooff, src, port, proto); |