Re: [PATCH net] neighbour: do not update an existing proxy entry on SIOCSARP

From: Kuniyuki Iwashima

Date: Mon Nov 16 2026 - 19:20:19 EST


On Fri, 13 Nov 2026 14:33:55 -0500, Hengyu Liang wrote:
> Commit dc2a27e524ac ("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 cbada1048847 ("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 dc2a27e524ac ("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: dc2a27e524ac ("neighbour: Update pneigh_entry in pneigh_create().")
> Signed-off-by: Hengyu Liang <hengyul@xxxxxxxxxx>

Reviewed-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>

Thanks !