aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-08-15 09:20:36 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-08-15 09:20:36 +0200
commit22556f42f979fcc8ab121a89627c4d98255e6ffc (patch)
treefd849bbe91dd84c2c2e30cc73cfb5b970e1510a3 /kernel
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff)
downloadwireguard-linux-22556f42f979fcc8ab121a89627c4d98255e6ffc.tar.xz
wireguard-linux-22556f42f979fcc8ab121a89627c4d98255e6ffc.zip
net: xdp: pull ethernet header off packet after computing skb->protocol
When an XDP program changes the ethernet header protocol field, eth_type_trans is used to recalculate skb->protocol. In order for eth_type_trans to work correctly, the ethernet header must actually be part of the skb data segment, so the code first pushes that onto the head of the skb. However, it subsequently forgets to pull it back off, making the behavior of the passed-on packet inconsistent between the protocol modifying case and the static protocol case. This patch fixes the issue by simply pulling the ethernet header back off of the skb head. Fixes: 297249569932 ("net: fix generic XDP to handle if eth header was mangled") Cc: Jesper Dangaard Brouer <brouer@redhat.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions