lede/target/linux/ramips/patches-5.10/902-mtkhnat-fix-pskb-expand-head-limitation.patch
2024-05-20 23:40:29 +08:00

21 lines
604 B
Diff

--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -71,6 +71,7 @@
#include <net/xfrm.h>
#include <net/mpls.h>
#include <net/mptcp.h>
+#include <net/ra_nat.h>
#include <linux/uaccess.h>
#include <trace/events/skb.h>
@@ -1693,6 +1694,9 @@ int pskb_expand_head(struct sk_buff *skb
skb_shinfo(skb),
offsetof(struct skb_shared_info, frags[skb_shinfo(skb)->nr_frags]));
+ /*headroom copy*/
+ memcpy(data, skb->head, FOE_INFO_LEN);
+
/*
* if shinfo is shared we must drop the old head gracefully, but if it
* is not we can just drop the old head and let the existing refcount