On 10/12/21 5:05 PM, Daniel Borkmann wrote:
On 10/12/21 4:51 PM, David Ahern wrote:
On 10/11/21 6:12 AM, Daniel Borkmann wrote:
[...]
@@ -1254,8 +1281,8 @@ static int __neigh_update(struct neighbour *neigh, const u8 *lladdr,
(old & (NUD_NOARP | NUD_PERMANENT)))
goto out;
- ext_learn_change = neigh_update_ext_learned(neigh, flags, ¬ify);
- if (flags & NEIGH_UPDATE_F_USE) {
+ neigh_update_flags(neigh, flags, ¬ify, &gc_update, &managed_update);
+ if (flags & (NEIGH_UPDATE_F_USE | NEIGH_UPDATE_F_MANAGED)) {
new = old & ~NUD_PERMANENT;
so a neighbor entry can not be both managed and permanent, but you don't
check for the combination in neigh_add and error out with a message to
the user.
Good point, I'll error out if both NUD_PERMANENT and NTF_MANAGED is set in neigh_add().
Thanks for the review!
Ah, I missed that this was already applied, will send a relative diff in that case.
Thanks,
Daniel