@@ -321,7 +321,7 @@ static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb)
321
321
static void arp_solicit (struct neighbour * neigh , struct sk_buff * skb )
322
322
{
323
323
__be32 saddr = 0 ;
324
- u8 * dst_ha = NULL ;
324
+ u8 dst_ha [ MAX_ADDR_LEN ] ;
325
325
struct net_device * dev = neigh -> dev ;
326
326
__be32 target = * (__be32 * )neigh -> primary_key ;
327
327
int probes = atomic_read (& neigh -> probes );
@@ -363,9 +363,9 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
363
363
if (probes < 0 ) {
364
364
if (!(neigh -> nud_state & NUD_VALID ))
365
365
pr_debug ("trying to ucast probe in NUD_INVALID\n" );
366
- dst_ha = neigh -> ha ;
367
- read_lock_bh (& neigh -> lock );
366
+ neigh_ha_snapshot (dst_ha , neigh , dev );
368
367
} else {
368
+ memset (dst_ha , 0 , dev -> addr_len );
369
369
probes -= neigh -> parms -> app_probes ;
370
370
if (probes < 0 ) {
371
371
#ifdef CONFIG_ARPD
@@ -377,8 +377,6 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
377
377
378
378
arp_send (ARPOP_REQUEST , ETH_P_ARP , target , dev , saddr ,
379
379
dst_ha , dev -> dev_addr , NULL );
380
- if (dst_ha )
381
- read_unlock_bh (& neigh -> lock );
382
380
}
383
381
384
382
static int arp_ignore (struct in_device * in_dev , __be32 sip , __be32 tip )
0 commit comments