Re: [PATCH net-next 4/4] net, neigh: Add NTF_MANAGED flag for managed neighbor entries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, &notify);
-    if (flags & NEIGH_UPDATE_F_USE) {
+    neigh_update_flags(neigh, flags, &notify, &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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux