summaryrefslogtreecommitdiff
path: root/net/ipv4/fou_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/fou_core.c')
-rw-r--r--net/ipv4/fou_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/fou_core.c b/net/ipv4/fou_core.c
index 3970b6b7ace5..ab8f309f8925 100644
--- a/net/ipv4/fou_core.c
+++ b/net/ipv4/fou_core.c
@@ -215,6 +215,9 @@ static int gue_udp_recv(struct sock *sk, struct sk_buff *skb)
return gue_control_message(skb, guehdr);
proto_ctype = guehdr->proto_ctype;
+ if (unlikely(!proto_ctype))
+ goto drop;
+
__skb_pull(skb, sizeof(struct udphdr) + hdrlen);
skb_reset_transport_header(skb);