Message ID | 20200526180706.199338-1-colin.king@canonical.com |
---|---|
State | New |
Headers | show |
Series | [next] netfilter: conntrack: fix an unsigned int comparison to less than zero | expand |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 08e0c19f6b39..2933b96a90c6 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -2114,7 +2114,7 @@ static int nf_confirm_cthelper(struct sk_buff *skb, struct nf_conn *ct, pnum = ipv6_hdr(skb)->nexthdr; protoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &pnum, &frag_off); - if (protoff < 0 || (frag_off & htons(~0x7)) != 0) + if ((int)protoff < 0 || (frag_off & htons(~0x7)) != 0) return 0; break; }