]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
netlink: specs: add big-endian byte-order for u32 IPv4 addresses
authorHangbin Liu <liuhangbin@gmail.com>
Tue, 25 Nov 2025 11:20:48 +0000 (11:20 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Nov 2025 01:14:17 +0000 (17:14 -0800)
The fix commit converted several IPv4 address attributes from binary
to u32, but forgot to specify byte-order: big-endian. Without this,
YNL tools display IPv4 addresses incorrectly due to host-endian
interpretation.

Add the missing byte-order: big-endian to all affected u32 IPv4
address fields to ensure correct parsing and display.

Fixes: 1064d521d177 ("netlink: specs: support ipv4-or-v6 for dual-stack fields")
Reported-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Link: https://patch.msgid.link/20251125112048.37631-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/specs/rt-addr.yaml
Documentation/netlink/specs/rt-link.yaml

index abcbaa73fa9dc37c0a2dbb2c288f59fa96ebc4fb..163a106c41bb45098fe640a2f5e4a2103a9cd5af 100644 (file)
@@ -97,6 +97,7 @@ attribute-sets:
       -
         name: broadcast
         type: u32
+        byte-order: big-endian
         display-hint: ipv4
       -
         name: anycast
index ca22c68ca6914ab50a2648091a9f1cd4c129ab7e..6beeb6ee5adf10b29ce9cabe60641a7f01746da6 100644 (file)
@@ -1869,6 +1869,7 @@ attribute-sets:
       -
         name: remote
         type: u32
+        byte-order: big-endian
         display-hint: ipv4
       -
         name: ttl
@@ -1987,6 +1988,7 @@ attribute-sets:
       -
         name: 6rd-relay-prefix
         type: u32
+        byte-order: big-endian
         display-hint: ipv4
       -
         name: 6rd-prefixlen