Files
linux/include
Hengyu Liang 035fe1092f neighbour: do not update an existing proxy entry on SIOCSARP
Commit dc2a27e524 ("neighbour: Update pneigh_entry in
pneigh_create().") moved the update of flags, protocol and permanent
from neigh_add() into pneigh_create().

However, arp_req_set_public() also calls pneigh_create(), with all
three set to zero. As of now, SIOCSARP on an address that already has a
proxy entry clears the flags of the entry and makes it non-permanent.
The entry is then removed when the carrier goes down, and the host no
longer answers ARP requests for the address.

A similar issue happened before with the protocol. It was fixed by
commit cbada10488 ("neighbour: restore protocol != 0 check in pneigh
update"). Perhaps flags and permanent need a fix as well.

The issue can be reproduced with:

    ip link add d0 type veth peer name d1
    ip link set d0 up
    ip link set d1 up
    ip neigh add proxy 10.9.9.9 dev d0
    arp -i d0 -Ds 10.9.9.9 d0 pub
    ip link set d1 down
    sleep 1
    ip neigh show proxy

Before commit dc2a27e524 ("neighbour: Update pneigh_entry in
pneigh_create()."), the result is:

    10.9.9.9 dev d0 proxy

After that commit, the result is empty.

This patch will add an update argument to pneigh_create(). Only
neigh_add() sets it, so SIOCSARP leaves an existing entry alone again.

Fixes: dc2a27e524 ("neighbour: Update pneigh_entry in pneigh_create().")
Signed-off-by: Hengyu Liang <[email protected]>
Reviewed-by: Kuniyuki Iwashima <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-17 17:04:03 -08:00
..
…
…
…
…
…
2026-10-23 22:57:34 -04:00
…
…
…