tools: ynl: add uns-admin-perm to genetlink
Subsystems (3)
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
@@ -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
Donald Hunter
maintainerQuoted 33 lines · Antonio Quartulli
GENL_UNS_ADMIN_PERMmay be required by protocols using thegenetlinkfamily, however, this flag is currently only allowed ingenetlink-legacy.Add it to the list of possible values in
genetlink.yamltoo.Cc Simon Horman <[email protected]>Cc Donald Hunter <[email protected]>Suggested-by Ralf Lici <[email protected]>Signed-off-by Antonio Quartulli <[email protected]>---
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
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.
Jakub Kicinski
maintainerQuoted 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.
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_PERMmay be required by protocols using thegenetlinkfamily, however, this flag is currently only allowed ingenetlink-legacy.Add it to the list of possible values in
genetlink.yamltoo.
Quoted 7 lines
Cc Simon Horman <[email protected]>Cc Donald Hunter <[email protected]>Suggested-by Ralf Lici <[email protected]>Signed-off-by Antonio Quartulli <[email protected]>[...]
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