Skip to contentSkip to conversation

netfilter: nfnetlink_cthelper: protocol offset signess in IPv6

PATCH New Pablo Neira Ayuso 1 participant 1 message May 27, 2020

Subsystems (2)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: nfnetlink_cthelper: protocol offset signess in IPv6

net/netfilter/nf_conntrack_core.c: In function nf_confirm_cthelper:
net/netfilter/nf_conntrack_core.c:2117:15: warning: comparison of unsigned expression in < 0 is always false [-Wtype-limits]
2117 | if (protoff < 0 || (frag_off & htons(~0x7)) != 0)
| ^

ipv6_skip_exthdr() returns a signed integer.

Fixes 703acd70f249 ("netfilter: nfnetlink_cthelper: unbreak userspace helper support")
---
 net/netfilter/nf_conntrack_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_conntrack_core.c +1 -1
index e3b054a2f796..bb72ca5f3999 100644
@@ -2092,7 +2092,7 @@ static int nf_confirm_cthelper(struct sk_buff *skb, struct nf_conn *ct,
 {
 	const struct nf_conntrack_helper *helper;
 	const struct nf_conn_help *help;
-	unsigned int protoff;
+	int protoff;
 
 	help = nfct_help(ct);
 	if (!help)
Signature · 1 line
2.20.1