Skip to content

Commit

Permalink
[IPV6]: Fix SKB leak in ip6_input_finish()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Aug 17, 2005
1 parent 35d59ef commit bfd272b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions net/ipv6/ip6_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bfd272b

Please sign in to comment.