]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools: ynl: add ipv4-or-v6 display hint
authorAsbjørn Sloth Tønnesen <ast@fiberby.net>
Mon, 15 Sep 2025 14:42:56 +0000 (14:42 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 16 Sep 2025 15:16:57 +0000 (08:16 -0700)
commit1b255e1beabf6826758d6018ddd2e1e3bba32f44
tree6b850b35d28d359d6354603d8e3af6eec2303d9e
parent52550d518d2454bf0af0b79ca54b6d38f2d94777
tools: ynl: add ipv4-or-v6 display hint

The attribute WGALLOWEDIP_A_IPADDR can contain either an IPv4
or an IPv6 address depending on WGALLOWEDIP_A_FAMILY, however
in practice it is enough to look at the attribute length.

This patch implements an ipv4-or-v6 display hint, that can
deal with this kind of attribute.

It only implements this display hint for genetlink-legacy, it
can be added to other protocol variants if needed, but we don't
want to encourage it's use.

Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20250915144301.725949-12-ast@fiberby.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/genetlink-legacy.yaml
tools/net/ynl/pyynl/lib/ynl.py