Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

netlink: specs: support ipv4-or-v6 for dual-stack fields

Since commit 1b255e1beabf ("tools: ynl: add ipv4-or-v6 display hint"), we
can display either IPv4 or IPv6 addresses for a single field based on the
address family. However, most dual-stack fields still use the ipv4 display
hint. This update changes them to use the new ipv4-or-v6 display hint and
converts IPv4-only fields to use the u32 type.

Field changes:
- v4-or-v6
- IFA_ADDRESS, IFA_LOCAL
- IFLA_GRE_LOCAL, IFLA_GRE_REMOTE
- IFLA_VTI_LOCAL, IFLA_VTI_REMOTE
- IFLA_IPTUN_LOCAL, IFLA_IPTUN_REMOTE
- NDA_DST
- RTA_DST, RTA_SRC, RTA_GATEWAY, RTA_PREFSRC
- FRA_SRC, FRA_DST
- ipv4
- IFA_BROADCAST
- IFLA_GENEVE_REMOTE
- IFLA_IPTUN_6RD_RELAY_PREFIX

Reviewed-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20251117024457.3034-3-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Hangbin Liu and committed by
Jakub Kicinski
1064d521 4abe51db

+23 -21
+1 -1
Documentation/netlink/genetlink.yaml
··· 185 185 Optional format indicator that is intended only for choosing 186 186 the right formatting mechanism when displaying values of this 187 187 type. 188 - enum: [ hex, mac, fddi, ipv4, ipv6, uuid ] 188 + enum: [ hex, mac, fddi, ipv4, ipv6, ipv4-or-v6, uuid ] 189 189 190 190 # Make sure name-prefix does not appear in subsets (subsets inherit naming) 191 191 dependencies:
+3 -3
Documentation/netlink/specs/rt-addr.yaml
··· 86 86 - 87 87 name: address 88 88 type: binary 89 - display-hint: ipv4 89 + display-hint: ipv4-or-v6 90 90 - 91 91 name: local 92 92 type: binary 93 - display-hint: ipv4 93 + display-hint: ipv4-or-v6 94 94 - 95 95 name: label 96 96 type: string 97 97 - 98 98 name: broadcast 99 - type: binary 99 + type: u32 100 100 display-hint: ipv4 101 101 - 102 102 name: anycast
+8 -8
Documentation/netlink/specs/rt-link.yaml
··· 1707 1707 - 1708 1708 name: local 1709 1709 type: binary 1710 - display-hint: ipv4 1710 + display-hint: ipv4-or-v6 1711 1711 - 1712 1712 name: remote 1713 1713 type: binary 1714 - display-hint: ipv4 1714 + display-hint: ipv4-or-v6 1715 1715 - 1716 1716 name: ttl 1717 1717 type: u8 ··· 1833 1833 - 1834 1834 name: local 1835 1835 type: binary 1836 - display-hint: ipv4 1836 + display-hint: ipv4-or-v6 1837 1837 - 1838 1838 name: remote 1839 1839 type: binary 1840 - display-hint: ipv4 1840 + display-hint: ipv4-or-v6 1841 1841 - 1842 1842 name: fwmark 1843 1843 type: u32 ··· 1868 1868 type: u32 1869 1869 - 1870 1870 name: remote 1871 - type: binary 1871 + type: u32 1872 1872 display-hint: ipv4 1873 1873 - 1874 1874 name: ttl ··· 1952 1952 - 1953 1953 name: local 1954 1954 type: binary 1955 - display-hint: ipv4 1955 + display-hint: ipv4-or-v6 1956 1956 - 1957 1957 name: remote 1958 1958 type: binary 1959 - display-hint: ipv4 1959 + display-hint: ipv4-or-v6 1960 1960 - 1961 1961 name: ttl 1962 1962 type: u8 ··· 1986 1986 display-hint: ipv6 1987 1987 - 1988 1988 name: 6rd-relay-prefix 1989 - type: binary 1989 + type: u32 1990 1990 display-hint: ipv4 1991 1991 - 1992 1992 name: 6rd-prefixlen
+1 -1
Documentation/netlink/specs/rt-neigh.yaml
··· 194 194 - 195 195 name: dst 196 196 type: binary 197 - display-hint: ipv4 197 + display-hint: ipv4-or-v6 198 198 - 199 199 name: lladdr 200 200 type: binary
+4 -4
Documentation/netlink/specs/rt-route.yaml
··· 87 87 - 88 88 name: dst 89 89 type: binary 90 - display-hint: ipv4 90 + display-hint: ipv4-or-v6 91 91 - 92 92 name: src 93 93 type: binary 94 - display-hint: ipv4 94 + display-hint: ipv4-or-v6 95 95 - 96 96 name: iif 97 97 type: u32 ··· 101 101 - 102 102 name: gateway 103 103 type: binary 104 - display-hint: ipv4 104 + display-hint: ipv4-or-v6 105 105 - 106 106 name: priority 107 107 type: u32 108 108 - 109 109 name: prefsrc 110 110 type: binary 111 - display-hint: ipv4 111 + display-hint: ipv4-or-v6 112 112 - 113 113 name: metrics 114 114 type: nest
+4 -2
Documentation/netlink/specs/rt-rule.yaml
··· 96 96 attributes: 97 97 - 98 98 name: dst 99 - type: u32 99 + type: binary 100 + display-hint: ipv4-or-v6 100 101 - 101 102 name: src 102 - type: u32 103 + type: binary 104 + display-hint: ipv4-or-v6 103 105 - 104 106 name: iifname 105 107 type: string