diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ip_input.c | 6 | ||||
-rw-r--r-- | net/ipv6/ip6_input.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index 87abd3e2bd32..2bdf802e28e2 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -228,9 +228,11 @@ static int ip_local_deliver_finish(struct sk_buff *skb) | |||
228 | icmp_send(skb, ICMP_DEST_UNREACH, | 228 | icmp_send(skb, ICMP_DEST_UNREACH, |
229 | ICMP_PROT_UNREACH, 0); | 229 | ICMP_PROT_UNREACH, 0); |
230 | } | 230 | } |
231 | } else | 231 | kfree_skb(skb); |
232 | } else { | ||
232 | IP_INC_STATS_BH(net, IPSTATS_MIB_INDELIVERS); | 233 | IP_INC_STATS_BH(net, IPSTATS_MIB_INDELIVERS); |
233 | kfree_skb(skb); | 234 | consume_skb(skb); |
235 | } | ||
234 | } | 236 | } |
235 | } | 237 | } |
236 | out: | 238 | out: |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 5b10414e619e..b1876e52091e 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -241,9 +241,11 @@ resubmit: | |||
241 | icmpv6_send(skb, ICMPV6_PARAMPROB, | 241 | icmpv6_send(skb, ICMPV6_PARAMPROB, |
242 | ICMPV6_UNK_NEXTHDR, nhoff); | 242 | ICMPV6_UNK_NEXTHDR, nhoff); |
243 | } | 243 | } |
244 | } else | 244 | kfree_skb(skb); |
245 | } else { | ||
245 | IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INDELIVERS); | 246 | IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INDELIVERS); |
246 | kfree_skb(skb); | 247 | consume_skb(skb); |
248 | } | ||
247 | } | 249 | } |
248 | rcu_read_unlock(); | 250 | rcu_read_unlock(); |
249 | return 0; | 251 | return 0; |