diff options
| author | Sabrina Dubroca | 2026-03-10 22:59:16 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman | 2026-03-19 16:14:58 +0100 |
| commit | 53a60b92d3e25b79c38ac2ddb36889af92378679 (patch) | |
| tree | e3881459522130fa72c871e7880c28e5834b7b3b /net | |
| parent | 9e87f37faa99a6a4214581b0db626c8af30a099d (diff) | |
neighbour: restore protocol != 0 check in pneigh update
[ Upstream commit cbada1048847a348797aec63a1d8056621cbe653 ]
Prior to commit dc2a27e524ac ("neighbour: Update pneigh_entry in
pneigh_create()."), a pneigh's protocol was updated only when the
value of the NDA_PROTOCOL attribute was non-0. While moving the code,
that check was removed. This is a small change of user-visible
behavior, and inconsistent with the (non-proxy) neighbour behavior.
Fixes: dc2a27e524ac ("neighbour: Update pneigh_entry in pneigh_create().")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/38c61de1bb032871a886aff9b9b52fe1cdd4cada.1772894876.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/core/neighbour.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 96a3b1a93252..e4ee0c02fb44 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -821,7 +821,8 @@ int pneigh_create(struct neigh_table *tbl, struct net *net, update: WRITE_ONCE(n->flags, flags); n->permanent = permanent; - WRITE_ONCE(n->protocol, protocol); + if (protocol) + WRITE_ONCE(n->protocol, protocol); out: mutex_unlock(&tbl->phash_lock); return err; |
