diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 2f6739fe78af2e8e90c0a3b474c2e99c83e02994..c79152fb0c0a42b7b9080b6bf71ac2da81f9a5b7 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -825,6 +825,9 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev, if (!pskb_inet_may_pull(skb)) return -EINVAL; + if (skb->len <= 22) + DO_ONCE_LITE(skb_dump, KERN_ERR, skb, false); + if (!gs4) return -EIO; diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index 5cd64bb2104df389250fb3c518ba00a3826c53f7..62ada983bc5c1b8df16b9147785982c2e5d98a8b 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h @@ -345,7 +345,7 @@ static inline bool pskb_inet_may_pull(struct sk_buff *skb) { int nhlen; - switch (skb->protocol) { + switch (skb_protocol(skb, true)) { #if IS_ENABLED(CONFIG_IPV6) case htons(ETH_P_IPV6): nhlen = sizeof(struct ipv6hdr);