]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip: display the 'netns-immutable' property
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Fri, 28 Mar 2025 09:58:26 +0000 (10:58 +0100)
committerDavid Ahern <dsahern@kernel.org>
Tue, 1 Apr 2025 03:35:41 +0000 (03:35 +0000)
The user needs to specify '-details' to have it.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
ip/ipaddress.c

index 70b3d513e510e6939e7799530236d1b0c9f5e6cc..91d78874699b634a79f34c4ec9d3411a5730dd44 100644 (file)
@@ -1182,6 +1182,11 @@ int print_linkinfo(struct nlmsghdr *n, void *arg)
                                   "max_mtu", "maxmtu %u ",
                                   rta_getattr_u32(tb[IFLA_MAX_MTU]));
 
+               if (tb[IFLA_NETNS_IMMUTABLE] &&
+                   rta_getattr_u8(tb[IFLA_NETNS_IMMUTABLE]))
+                       print_bool(PRINT_ANY, "netns-immutable", "netns-immutable ",
+                                  true);
+
                if (tb[IFLA_LINKINFO])
                        print_linktype(fp, tb[IFLA_LINKINFO]);