Subject: Re: [PATCH net-next] tools: ynl: add uns-admin-perm to genetlink

From: Donald Hunter <[email-masked]>
Date: Thu, 05 Mar 2026 11:36:50 +0000

Antonio Quartulli <[email-masked]> writes:

> GENL_UNS_ADMIN_PERM may be required by protocols using
> the `genetlink` family, however, this flag is currently
> only allowed in `genetlink-legacy`.
>
> Add it to the list of possible values in genetlink.yaml too.
>
> Cc: Simon Horman <[email-masked]>
> Cc: Donald Hunter <[email-masked]>
> Link: https://github.com/OpenVPN/ovpn-net-next/issues/33
> Suggested-by: Ralf Lici <[email-masked]>
> Signed-off-by: Antonio Quartulli <[email-masked]>
> ---
>
> As described in the linked GH issue, we hit an issue with OpenVPN
> running in a user namespace that was unable to send netlink
> messages to the ovpn kernel module.
>
> After checking how other modules handles this, we saw that we
> required the uns-admin-perm cmd-flag. However, this flag is allowed
> only for genetlink-legacy protocols, which ovpn is not.
>
> I don't see a clear reason why genetlink shouldn't have this flag too,
> hence I am proposing this patch.
>
>
>  Documentation/netlink/genetlink.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/netlink/genetlink.yaml b/Documentation/netlink/genetlink.yaml
> index b020a537d8ac..a1194d5d93fc 100644
> --- a/Documentation/netlink/genetlink.yaml
> +++ b/Documentation/netlink/genetlink.yaml
> @@ -262,7 +262,7 @@ properties:
>                description: Command flags.
>                type: array
>                items:
> -                enum: [ admin-perm ]
> +                enum: [ admin-perm, uns-admin-perm ]
>              dont-validate:
>                description: Kernel attribute validation flags.
>                type: array

For completeness the flag should probably also be added to
genetlink-c.yaml since:

netlink-raw > genetlink-legacy > genetlink-c > genetlink

Though I see that genetlink-c is not actually referenced by any specs
today so maybe we don't need it. I defer to Jakub for guidance.