diff options
-rw-r--r-- | net/core/dev.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_tproxy_core.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 220f52a1001e..3337cf98f231 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2288,6 +2288,8 @@ ncls: | |||
2288 | if (!skb) | 2288 | if (!skb) |
2289 | goto out; | 2289 | goto out; |
2290 | 2290 | ||
2291 | skb_orphan(skb); | ||
2292 | |||
2291 | type = skb->protocol; | 2293 | type = skb->protocol; |
2292 | list_for_each_entry_rcu(ptype, | 2294 | list_for_each_entry_rcu(ptype, |
2293 | &ptype_base[ntohs(type) & PTYPE_HASH_MASK], list) { | 2295 | &ptype_base[ntohs(type) & PTYPE_HASH_MASK], list) { |
diff --git a/net/netfilter/nf_tproxy_core.c b/net/netfilter/nf_tproxy_core.c index cdc97f3105a3..5490fc37c92d 100644 --- a/net/netfilter/nf_tproxy_core.c +++ b/net/netfilter/nf_tproxy_core.c | |||
@@ -71,6 +71,7 @@ int | |||
71 | nf_tproxy_assign_sock(struct sk_buff *skb, struct sock *sk) | 71 | nf_tproxy_assign_sock(struct sk_buff *skb, struct sock *sk) |
72 | { | 72 | { |
73 | if (inet_sk(sk)->transparent) { | 73 | if (inet_sk(sk)->transparent) { |
74 | skb_orphan(skb); | ||
74 | skb->sk = sk; | 75 | skb->sk = sk; |
75 | skb->destructor = nf_tproxy_destructor; | 76 | skb->destructor = nf_tproxy_destructor; |
76 | return 1; | 77 | return 1; |