Le 27/11/2026 à 04:22, Anil Kaushik a écrit :> Check that a Generic Netlink group ID no family owns cannot be joined:
> > - setsockopt(NETLINK_ADD_MEMBERSHIP) on a free ID fails with ENOENT, > and still works on an owned group. > - bind() with a mask of free IDs succeeds and joins nothing. With an > owned group in the mask, it joins only that group. > - A socket bound to the free IDs is not a member of the NET_DM groups > after drop_monitor is loaded. The test unloads drop_monitor again > after it loaded it. Skipped when NET_DM is already registered or > drop_monitor is not available. > > The free IDs are found with a family dump, which only lists the families > of the current network namespace, so these checks are skipped outside > the initial one. It is found with its fixed nsfs inode number, which > also works in a container with its own PID namespace. Kernels before > v6.17 do not have that number, so the checks are skipped there too. > > Suggested-by: Nicolas Dichtel <nico…@6wind.com> > Signed-off-by: Anil Kaushik <anil…@gmail.com>
Reviewed-by: Nicolas Dichtel <nico…@6wind.com>