Skip to contentSkip to conversation

tools: ynl: add uns-admin-perm to genetlink

PATCH Applied Antonio Quartulli 4 participants 4 messages Mar 4 – Mar 6

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: ynl: add uns-admin-perm to genetlink

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.

---

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(-)
Documentation/netlink/genetlink.yaml +1 -1
index b020a537d8ac..a1194d5d93fc 100644
@@ -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
Signature · 1 line
2.52.0
maintainer
#1 lore raw
Quoted 33 lines · Antonio Quartulli

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.

---

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(-)
Documentation/netlink/genetlink.yaml +0 -0
index b020a537d8ac..a1194d5d93fc 100644

Documentation/netlink/genetlink.yaml properties: · line 268

Quoted 8 lines
Documentation/netlink/genetlink.yaml +1 -1
@@ -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.

maintainer
#2 lore raw
Quoted 2 lines · 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.

#3 lore raw
In reply to Antonio Quartulli
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 6 lines · 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.

Quoted 7 lines

[...]

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html