mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
neighbour: restore protocol != 0 check in pneigh update
Prior to commitdc2a27e524("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:dc2a27e524("neighbour: Update pneigh_entry in pneigh_create().") Signed-off-by: Sabrina Dubroca <[email protected]> Reviewed-by: David Ahern <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Link: https://patch.msgid.link/38c61de1bb032871a886aff9b9b52fe1cdd4cada.1772894876.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
committed by
Jakub Kicinski
parent
e8f0dc024c
commit
cbada10488
@@ -820,7 +820,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;
|
||||
|
||||
Reference in New Issue
Block a user