From c1153955e8789843a5c2e5ad74b2f82808b7ad12 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Fri, 21 Dec 2012 07:32:10 +0000 Subject: [PATCH] --- yaml --- r: 348015 b: refs/heads/master c: 9650388b5c56578fdccc79c57a8c82fb92b8e7f1 h: refs/heads/master i: 348013: f5113e9b08a4bd91712939495e6ac37bbf19034a 348011: a6affa58aefece8718231bce4e17387f86bdcc4e 348007: 72f138dee4e0cbd9e40c64ef171e628178698d9e 347999: dec43ae8d2a4449f0e546715d74dd46366102939 v: v3 --- [refs] | 2 +- trunk/net/ipv4/arp.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 3c2f08ba726a..d21743aefa06 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9fdc6bef5f1e8b5d3e65c2e7086033034b0dd307 +refs/heads/master: 9650388b5c56578fdccc79c57a8c82fb92b8e7f1 diff --git a/trunk/net/ipv4/arp.c b/trunk/net/ipv4/arp.c index ce6fbdfd40b8..1169ed41d587 100644 --- a/trunk/net/ipv4/arp.c +++ b/trunk/net/ipv4/arp.c @@ -321,7 +321,7 @@ static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb) static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb) { __be32 saddr = 0; - u8 *dst_ha = NULL; + u8 dst_ha[MAX_ADDR_LEN]; struct net_device *dev = neigh->dev; __be32 target = *(__be32 *)neigh->primary_key; int probes = atomic_read(&neigh->probes); @@ -363,9 +363,9 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb) if (probes < 0) { if (!(neigh->nud_state & NUD_VALID)) pr_debug("trying to ucast probe in NUD_INVALID\n"); - dst_ha = neigh->ha; - read_lock_bh(&neigh->lock); + neigh_ha_snapshot(dst_ha, neigh, dev); } else { + memset(dst_ha, 0, dev->addr_len); probes -= neigh->parms->app_probes; if (probes < 0) { #ifdef CONFIG_ARPD @@ -377,8 +377,6 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb) arp_send(ARPOP_REQUEST, ETH_P_ARP, target, dev, saddr, dst_ha, dev->dev_addr, NULL); - if (dst_ha) - read_unlock_bh(&neigh->lock); } static int arp_ignore(struct in_device *in_dev, __be32 sip, __be32 tip)