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 <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Mon Oct 9 09:32:35 CEST 2017 From: Edward Cree <ecree@xxxxxxxxxxxxxx> Date: Tue, 19 Sep 2017 18:45:56 +0100 Subject: net: change skb->mac_header when Generic XDP calls adjust_head From: Edward Cree <ecree@xxxxxxxxxxxxxx> [ 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. Fixes: b5cdae3291f7 ("net: Generic XDP") Signed-off-by: Edward Cree <ecree@xxxxxxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/core/dev.c | 1 + 1 file changed, 1 insertion(+) --- a/net/core/dev.c +++ b/net/core/dev.c @@ -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 ecree@xxxxxxxxxxxxxx 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