developer | 5d148cb | 2023-06-02 13:08:11 +0800 | [diff] [blame] | 1 | From 5583834362f5a9050e701e324f6a9b4d7bf5fcdf Mon Sep 17 00:00:00 2001 |
| 2 | From: Sam Shih <sam.shih@mediatek.com> |
| 3 | Date: Fri, 2 Jun 2023 13:06:29 +0800 |
| 4 | Subject: [PATCH] |
| 5 | [networking][999-2707-mtkhnat-ipv6-fix-pskb-expand-head-limitation.patch] |
| 6 | |
| 7 | --- |
| 8 | net/core/skbuff.c | 4 ++++ |
| 9 | 1 file changed, 4 insertions(+) |
| 10 | |
developer | 0f67e42 | 2021-07-05 14:46:36 +0800 | [diff] [blame] | 11 | diff --git a/net/core/skbuff.c b/net/core/skbuff.c |
developer | 5d148cb | 2023-06-02 13:08:11 +0800 | [diff] [blame] | 12 | index 409f33e16..d91b2dfe2 100644 |
developer | 0f67e42 | 2021-07-05 14:46:36 +0800 | [diff] [blame] | 13 | --- a/net/core/skbuff.c |
| 14 | +++ b/net/core/skbuff.c |
| 15 | @@ -69,6 +69,7 @@ |
| 16 | #include <net/ip6_checksum.h> |
| 17 | #include <net/xfrm.h> |
| 18 | #include <net/mpls.h> |
| 19 | +#include <net/ra_nat.h> |
| 20 | |
| 21 | #include <linux/uaccess.h> |
| 22 | #include <trace/events/skb.h> |
| 23 | @@ -1666,6 +1667,9 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, |
| 24 | skb_shinfo(skb), |
| 25 | offsetof(struct skb_shared_info, frags[skb_shinfo(skb)->nr_frags])); |
| 26 | |
| 27 | + /*headroom copy*/ |
| 28 | + memcpy(data, skb->head, FOE_INFO_LEN); |
| 29 | + |
| 30 | /* |
| 31 | * if shinfo is shared we must drop the old head gracefully, but if it |
| 32 | * is not we can just drop the old head and let the existing refcount |
developer | 5d148cb | 2023-06-02 13:08:11 +0800 | [diff] [blame] | 33 | -- |
| 34 | 2.34.1 |
| 35 | |