]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb
authorPhillip Potter <phil@philpotter.co.uk>
Thu, 22 Apr 2021 23:49:45 +0000 (00:49 +0100)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Mon, 24 May 2021 23:46:42 +0000 (17:46 -0600)
commitc8db745d095bc1c33512de9bf12c3e885edac364
treea5bfdb9831291a2d5b441858428fdfa0db493138
parentbb7578026d7c8ebdc50c26faa8462b25694a4cf4
net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb

BugLink: https://bugs.launchpad.net/bugs/1929455
[ Upstream commit d13f048dd40e8577260cd43faea8ec9b77520197 ]

Modify the header size check in geneve6_xmit_skb and geneve_xmit_skb
to use pskb_inet_may_pull rather than pskb_network_may_pull. This fixes
two kernel selftest failures introduced by the commit introducing the
checks:
IPv4 over geneve6: PMTU exceptions
IPv4 over geneve6: PMTU exceptions - nexthop objects

It does this by correctly accounting for the fact that IPv4 packets may
transit over geneve IPv6 tunnels (and vice versa), and still fixes the
uninit-value bug fixed by the original commit.

Reported-by: kernel test robot <oliver.sang@intel.com>
Fixes: 6628ddfec758 ("net: geneve: check skb is large enough for IPv4/IPv6 header")
Suggested-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Acked-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/net/geneve.c