Commit cf0be880 authored by Cong Wang's avatar Cong Wang Committed by David S. Miller
Browse files

arp: fix a regression in arp_solicit()

Sedat reported the following commit caused a regression:

commit 9650388b

Author: Eric Dumazet <>
Date:   Fri Dec 21 07:32:10 2012 +0000

    ipv4: arp: fix a lockdep splat in arp_solicit

This is due to the 6th parameter of arp_send() needs to be NULL
for the broadcast case, the above commit changed it to an all-zero
array by mistake.

Reported-by: default avatarSedat Dilek <>
Tested-by: default avatarSedat Dilek <>
Cc: Sedat Dilek <>
Cc: Eric Dumazet <>
Cc: David S. Miller <>
Cc: Julian Anastasov <>
Signed-off-by: default avatarCong Wang <>
Acked-by: default avatarEric Dumazet <>
Signed-off-by: default avatarDavid S. Miller <>
parent d2fe85da
......@@ -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[MAX_ADDR_LEN];
u8 dst_ha[MAX_ADDR_LEN], *dst_hw = NULL;
struct net_device *dev = neigh->dev;
__be32 target = *(__be32 *)neigh->primary_key;
int probes = atomic_read(&neigh->probes);
......@@ -364,8 +364,8 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
if (!(neigh->nud_state & NUD_VALID))
pr_debug("trying to ucast probe in NUD_INVALID\n");
neigh_ha_snapshot(dst_ha, neigh, dev);
dst_hw = dst_ha;
} else {
memset(dst_ha, 0, dev->addr_len);
probes -= neigh->parms->app_probes;
if (probes < 0) {
......@@ -376,7 +376,7 @@ 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);
dst_hw, dev->dev_addr, NULL);
static int arp_ignore(struct in_device *in_dev, __be32 sip, __be32 tip)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment