Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfd272b1 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[IPV6]: 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 avatarDavid S. Miller <davem@davemloft.net>
parent 35d59efd
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -198,13 +198,14 @@ 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);
	}
	}
	rcu_read_unlock();
	return 0;