public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] tools: ynl: add uns-admin-perm to genetlink
@ 2026-03-04 14:10 Antonio Quartulli
  2026-03-05 11:36 ` Donald Hunter
  2026-03-06  3:32 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Antonio Quartulli @ 2026-03-04 14:10 UTC (permalink / raw)
  To: netdev, Jakub Kicinski, Paolo Abeni
  Cc: Antonio Quartulli, Simon Horman, Donald Hunter, Ralf Lici

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 <horms@kernel.org>
Cc: Donald Hunter <donald.hunter@gmail.com>
Link: https://github.com/OpenVPN/ovpn-net-next/issues/33
Suggested-by: Ralf Lici <ralf@mandelbit.com>
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
---

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
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] tools: ynl: add uns-admin-perm to genetlink
  2026-03-04 14:10 [PATCH net-next] tools: ynl: add uns-admin-perm to genetlink Antonio Quartulli
@ 2026-03-05 11:36 ` Donald Hunter
  2026-03-05 15:04   ` Jakub Kicinski
  2026-03-06  3:32 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Donald Hunter @ 2026-03-05 11:36 UTC (permalink / raw)
  To: Antonio Quartulli, Jakub Kicinski
  Cc: netdev, Paolo Abeni, Simon Horman, Ralf Lici

Antonio Quartulli <antonio@openvpn.net> 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 <horms@kernel.org>
> Cc: Donald Hunter <donald.hunter@gmail.com>
> Link: https://github.com/OpenVPN/ovpn-net-next/issues/33
> Suggested-by: Ralf Lici <ralf@mandelbit.com>
> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
> ---
>
> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] tools: ynl: add uns-admin-perm to genetlink
  2026-03-05 11:36 ` Donald Hunter
@ 2026-03-05 15:04   ` Jakub Kicinski
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2026-03-05 15:04 UTC (permalink / raw)
  To: Donald Hunter
  Cc: Antonio Quartulli, netdev, Paolo Abeni, Simon Horman, Ralf Lici

On Thu, 05 Mar 2026 11:36:50 +0000 Donald Hunter wrote:
> 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.

I think it came up in the past, I'm fine with deleting it.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] tools: ynl: add uns-admin-perm to genetlink
  2026-03-04 14:10 [PATCH net-next] tools: ynl: add uns-admin-perm to genetlink Antonio Quartulli
  2026-03-05 11:36 ` Donald Hunter
@ 2026-03-06  3:32 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-06  3:32 UTC (permalink / raw)
  To: Antonio Quartulli; +Cc: netdev, kuba, pabeni, horms, donald.hunter, ralf

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed,  4 Mar 2026 15:10:09 +0100 you wrote:
> 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 <horms@kernel.org>
> Cc: Donald Hunter <donald.hunter@gmail.com>
> Link: https://github.com/OpenVPN/ovpn-net-next/issues/33
> Suggested-by: Ralf Lici <ralf@mandelbit.com>
> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
> 
> [...]

Here is the summary with links:
  - [net-next] tools: ynl: add uns-admin-perm to genetlink
    https://git.kernel.org/netdev/net-next/c/e5e09233e8a9

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-06  3:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 14:10 [PATCH net-next] tools: ynl: add uns-admin-perm to genetlink Antonio Quartulli
2026-03-05 11:36 ` Donald Hunter
2026-03-05 15:04   ` Jakub Kicinski
2026-03-06  3:32 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox