]> www.infradead.org Git - users/dwmw2/linux.git/commit
vxlan: Pull inner IP header in vxlan_xmit_one().
authorGuillaume Nault <gnault@redhat.com>
Wed, 19 Jun 2024 13:34:57 +0000 (15:34 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 22 Jun 2024 00:34:15 +0000 (17:34 -0700)
commit31392048f55f98cb01ca709d32d06d926ab9760a
tree60039844971472f7744bf49b0594434822fb842d
parent8406b56a91ec458172c4fe1bb13038031e975b6a
vxlan: Pull inner IP header in vxlan_xmit_one().

Ensure the inner IP header is part of the skb's linear data before
setting old_iph. Otherwise, on a non-linear skb, old_iph could point
outside of the packet data.

Unlike classical VXLAN, which always encapsulates Ethernet packets,
VXLAN-GPE can transport IP packets directly. In that case, we need to
look at skb->protocol to figure out if an Ethernet header is present.

Fixes: d342894c5d2f ("vxlan: virtual extensible lan")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Link: https://patch.msgid.link/2aa75f6fa62ac9dbe4f16ad5ba75dd04a51d4b99.1718804000.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/vxlan/vxlan_core.c