Skip to content

Commit 4ed377e

Browse files
strssndktndavem330
authored andcommitted
net: neighbour: use source address of last enqueued packet for solicitation
Currently we always use the first member of the arp_queue to determine the sender ip address of the arp packet (or in case of IPv6 - source address of the ndisc packet). This skb is fixed as long as the queue is not drained by a complete purge because of a timeout or by a successful response. If the first packet enqueued on the arp_queue is from a local application with a manually set source address and the to be discovered system does some kind of uRPF checks on the source address in the arp packet the resolving process hangs until a timeout and restarts. This hurts communication with the participating network node. This could be mitigated a bit if we use the latest enqueued skb's source address for the resolving process, which is not as static as the arp_queue's head. This change of the source address could result in better recovery of a failed solicitation. Cc: "David S. Miller" <[email protected]> Cc: Julian Anastasov <[email protected]> Reviewed-by: Julian Anastasov <[email protected]> Signed-off-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent fd97ba5 commit 4ed377e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/neighbour.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ static void neigh_invalidate(struct neighbour *neigh)
867867
static void neigh_probe(struct neighbour *neigh)
868868
__releases(neigh->lock)
869869
{
870-
struct sk_buff *skb = skb_peek(&neigh->arp_queue);
870+
struct sk_buff *skb = skb_peek_tail(&neigh->arp_queue);
871871
/* keep skb alive even if arp_queue overflows */
872872
if (skb)
873873
skb = skb_copy(skb, GFP_ATOMIC);

0 commit comments

Comments
 (0)