Skip to content
Snippets Groups Projects
Commit f982542e authored by Patrick McHardy's avatar Patrick McHardy Committed by Chris Wright
Browse files

[PATCH] Fix SKB leak in ip6_input_finish()


Changing it to how ip_input handles should fix it.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatar"David S. Miller" <davem@davemloft.net>
Signed-off-by: default avatarChris Wright <chrisw@osdl.org>
parent ec3b77ec
No related branches found
No related tags found
No related merge requests found
......@@ -198,12 +198,13 @@ static inline int ip6_input_finish(struct sk_buff *skb)
if (!raw_sk) {
if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
IP6_INC_STATS_BH(IPSTATS_MIB_INUNKNOWNPROTOS);
icmpv6_param_prob(skb, ICMPV6_UNK_NEXTHDR, nhoff);
icmpv6_send(skb, ICMPV6_PARAMPROB,
ICMPV6_UNK_NEXTHDR, nhoff,
skb->dev);
}
} else {
} else
IP6_INC_STATS_BH(IPSTATS_MIB_INDELIVERS);
kfree_skb(skb);
}
kfree_skb(skb);
}
rcu_read_unlock();
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment