[IPV6]: Fix SKB leak in ip6_input_finish()

Changing it to how ip_input handles should fix it.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Patrick McHardy 2005-08-16 21:03:41 -07:00 committed by David S. Miller
parent c8ac377464
commit fad87acaea
1 changed files with 5 additions and 4 deletions

View File

@ -198,12 +198,13 @@ resubmit:
if (!raw_sk) { if (!raw_sk) {
if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
IP6_INC_STATS_BH(IPSTATS_MIB_INUNKNOWNPROTOS); 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); IP6_INC_STATS_BH(IPSTATS_MIB_INDELIVERS);
kfree_skb(skb); kfree_skb(skb);
}
} }
rcu_read_unlock(); rcu_read_unlock();
return 0; return 0;