projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b85be58
)
bpf: Make bpf_skb_vlan_pop helper metadata-safe
author
Jakub Sitnicki
<jakub@cloudflare.com>
Wed, 5 Nov 2025 20:19:42 +0000
(21:19 +0100)
committer
Martin KaFai Lau
<martin.lau@kernel.org>
Mon, 10 Nov 2025 18:52:31 +0000
(10:52 -0800)
Use the metadata-aware helper to move packet bytes after skb_pull(),
ensuring metadata remains valid after calling the BPF helper.
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link:
https://patch.msgid.link/20251105-skb-meta-rx-path-v4-5-5ceb08a9b37b@cloudflare.com
include/linux/if_vlan.h
patch
|
blob
|
history
diff --git
a/include/linux/if_vlan.h
b/include/linux/if_vlan.h
index
afa5cc6
..
4ecc250
100644
(file)
--- a/
include/linux/if_vlan.h
+++ b/
include/linux/if_vlan.h
@@
-738,9
+738,9
@@
static inline void vlan_remove_tag(struct sk_buff *skb, u16 *vlan_tci)
*vlan_tci = ntohs(vhdr->h_vlan_TCI);
- memmove(skb->data + VLAN_HLEN, skb->data, 2 * ETH_ALEN);
vlan_set_encap_proto(skb, vhdr);
__skb_pull(skb, VLAN_HLEN);
+ skb_postpull_data_move(skb, VLAN_HLEN, 2 * ETH_ALEN);
}
/**