All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: geneve: modify IP header check in geneve6_xmit_skb
@ 2021-04-21 23:11 Phillip Potter
  2021-04-22  0:39 ` Florian Westphal
  2021-04-22  6:43 ` Eric Dumazet
  0 siblings, 2 replies; 9+ messages in thread
From: Phillip Potter @ 2021-04-21 23:11 UTC (permalink / raw)
  To: davem; +Cc: kuba, netdev, linux-kernel, edumazet

Modify the check in geneve6_xmit_skb to use the size of a struct iphdr
rather than struct ipv6hdr. This fixes two kernel selftest failures
introduced by commit 6628ddfec758
("net: geneve: check skb is large enough for IPv4/IPv6 header"), without
diminishing the fix provided by that commit.

Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
 drivers/net/geneve.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 42f31c681846..a57a5e6f614f 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -988,7 +988,7 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
 	__be16 sport;
 	int err;
 
-	if (!pskb_network_may_pull(skb, sizeof(struct ipv6hdr)))
+	if (!pskb_network_may_pull(skb, sizeof(struct iphdr)))
 		return -EINVAL;
 
 	sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-04-22 21:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 23:11 [PATCH] net: geneve: modify IP header check in geneve6_xmit_skb Phillip Potter
2021-04-22  0:39 ` Florian Westphal
2021-04-22  0:56   ` Phillip Potter
2021-04-22 16:03   ` Sabrina Dubroca
2021-04-22 16:52     ` Eric Dumazet
2021-04-22 17:18       ` Sabrina Dubroca
2021-04-22 21:03         ` Phillip Potter
2021-04-22  6:43 ` Eric Dumazet
2021-04-22 20:58   ` Phillip Potter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.