Commit cbada104 authored by Sabrina Dubroca's avatar Sabrina Dubroca Committed by Jakub Kicinski
Browse files

neighbour: restore protocol != 0 check in pneigh update



Prior to commit dc2a27e5 ("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: dc2a27e5 ("neighbour: Update pneigh_entry in pneigh_create().")
Signed-off-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/38c61de1bb032871a886aff9b9b52fe1cdd4cada.1772894876.git.sd@queasysnail.net


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e8f0dc02
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -820,6 +820,7 @@ int pneigh_create(struct neigh_table *tbl, struct net *net,
update:
	WRITE_ONCE(n->flags, flags);
	n->permanent = permanent;
	if (protocol)
		WRITE_ONCE(n->protocol, protocol);
out:
	mutex_unlock(&tbl->phash_lock);