diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/neighbour.c | 12 | ||||
-rw-r--r-- | net/ipv4/arp.c | 3 |
2 files changed, 3 insertions, 12 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index a16cf1ec5e5e..7bb6a9a1256d 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -834,18 +834,12 @@ static void neigh_timer_handler(unsigned long arg) | |||
834 | } | 834 | } |
835 | if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) { | 835 | if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) { |
836 | struct sk_buff *skb = skb_peek(&neigh->arp_queue); | 836 | struct sk_buff *skb = skb_peek(&neigh->arp_queue); |
837 | /* keep skb alive even if arp_queue overflows */ | 837 | |
838 | if (skb) | ||
839 | skb_get(skb); | ||
840 | write_unlock(&neigh->lock); | ||
841 | neigh->ops->solicit(neigh, skb); | 838 | neigh->ops->solicit(neigh, skb); |
842 | atomic_inc(&neigh->probes); | 839 | atomic_inc(&neigh->probes); |
843 | if (skb) | ||
844 | kfree_skb(skb); | ||
845 | } else { | ||
846 | out: | ||
847 | write_unlock(&neigh->lock); | ||
848 | } | 840 | } |
841 | out: | ||
842 | write_unlock(&neigh->lock); | ||
849 | 843 | ||
850 | if (notify) | 844 | if (notify) |
851 | neigh_update_notify(neigh); | 845 | neigh_update_notify(neigh); |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 8e17f65f4002..c663fa5339ee 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -368,7 +368,6 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb) | |||
368 | if (!(neigh->nud_state&NUD_VALID)) | 368 | if (!(neigh->nud_state&NUD_VALID)) |
369 | printk(KERN_DEBUG "trying to ucast probe in NUD_INVALID\n"); | 369 | printk(KERN_DEBUG "trying to ucast probe in NUD_INVALID\n"); |
370 | dst_ha = neigh->ha; | 370 | dst_ha = neigh->ha; |
371 | read_lock_bh(&neigh->lock); | ||
372 | } else if ((probes -= neigh->parms->app_probes) < 0) { | 371 | } else if ((probes -= neigh->parms->app_probes) < 0) { |
373 | #ifdef CONFIG_ARPD | 372 | #ifdef CONFIG_ARPD |
374 | neigh_app_ns(neigh); | 373 | neigh_app_ns(neigh); |
@@ -378,8 +377,6 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb) | |||
378 | 377 | ||
379 | arp_send(ARPOP_REQUEST, ETH_P_ARP, target, dev, saddr, | 378 | arp_send(ARPOP_REQUEST, ETH_P_ARP, target, dev, saddr, |
380 | dst_ha, dev->dev_addr, NULL); | 379 | dst_ha, dev->dev_addr, NULL); |
381 | if (dst_ha) | ||
382 | read_unlock_bh(&neigh->lock); | ||
383 | } | 380 | } |
384 | 381 | ||
385 | static int arp_ignore(struct in_device *in_dev, __be32 sip, __be32 tip) | 382 | static int arp_ignore(struct in_device *in_dev, __be32 sip, __be32 tip) |