Re: [PATCH net] neighbour: do not update an existing proxy entry on SIOCSARP
From: Ido Schimmel
Date: Tue Nov 17 2026 - 12:49:24 EST
On Fri, Nov 13, 2026 at 02:33:55PM -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.
For future submissions:
Use imperative mood:
https://docs.kernel.org/next/process/submitting-patches.html#describe-your-changes
And include the necessary info in the commit message:
https://docs.kernel.org/next/process/maintainer-netdev.html#bug-fixes
>
> Fixes: dc2a27e524ac ("neighbour: Update pneigh_entry in pneigh_create().")
> Signed-off-by: Hengyu Liang <hengyul@xxxxxxxxxx>
Reviewed-by: Ido Schimmel <idosch@xxxxxxxxxx>