Netdev List
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@google.com>
To: Hengyu Liang <hengyul@cs.unc.edu>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>, David Ahern <dsahern@kernel.org>,
	 Ido Schimmel <idosch@nvidia.com>,
	Simon Horman <horms@kernel.org>,
	 Sabrina Dubroca <sd@queasysnail.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] neighbour: do not update an existing proxy entry on SIOCSARP
Date: Tue, 17 Nov 2026 00:20:05 +0000	[thread overview]
Message-ID: <avudn_RA-u2FweCW@google.com> (raw)
In-Reply-To: <20261113193355.3820232-1-hengyul@cs.unc.edu>

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@cs.unc.edu>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

Thanks !

      parent reply	other threads:[~2026-11-17  0:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 19:33 [PATCH net] neighbour: do not update an existing proxy entry on SIOCSARP Hengyu Liang
2026-11-13 19:37 ` netdev-bot+sinfo
2026-11-17  0:20 ` Kuniyuki Iwashima [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=avudn_RA-u2FweCW@google.com \
    --to=kuniyu@google.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=hengyul@cs.unc.edu \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox