Patch "net: change skb->mac_header when Generic XDP calls adjust_head" has been added to the 4.13-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
net: change skb->mac_header when Generic XDP calls adjust_head
to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-change-skb-mac_header-when-generic-xdp-calls-adjust_head.patch
and it can be found in the queue-4.13 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Oct 9 09:32:35 CEST 2017
From: Edward Cree <[email protected]>
Date: Tue, 19 Sep 2017 18:45:56 +0100
Subject: net: change skb->mac_header when Generic XDP calls adjust_head
From: Edward Cree <[email protected]>
[ Upstream commit 92dd5452c1be873a1193561f4f691763103d22ac ]
Since XDP's view of the packet includes the MAC header, moving the start-
of-packet with bpf_xdp_adjust_head needs to also update the offset of the MAC header (which is relative to skb->head, not to the skb->data that was changed).
Without this, tcpdump sees packets starting from the old MAC header rather
than the new one, at least in my tests on the loopback device.
--- net/core/dev.c | 1 + 1 file changed, 1 insertion(+)
net/core/dev.c +1 -0
@@ -4408,6 +4408,7 @@ static u32 netif_receive_generic_xdp(str__skb_pull (skb, off); else if (off < 0) __skb_push(skb, -off); + skb->mac_header += off;switch (act) {case XDP_TX :
Patches currently in stable-queue which might be from [email protected] are
queue-4.13/net-change-skb-mac_header-when-generic-xdp-calls-adjust_head.patch queue-4.13/bpf-verifier-reject-bpf_alu64-bpf_end.patch