]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
link: display 'allmulti' counter
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Mon, 19 Sep 2022 08:31:36 +0000 (10:31 +0200)
committerDavid Ahern <dsahern@kernel.org>
Thu, 22 Sep 2022 23:18:50 +0000 (16:18 -0700)
This counter is based on the same principle that the 'promiscuity' counter:
the flag ALLMULTI is displayed only when it is explicitly requested by the
userland. This counter enables to know if 'allmulti' is configured on an
interface.

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

index 71c1ad5f21a898137723bb8e022a30d1d13dba55..986cfbc3c2691c0d71d919e8ab9474f9b468ec38 100644 (file)
@@ -1205,6 +1205,12 @@ int print_linkinfo(struct nlmsghdr *n, void *arg)
                                   " promiscuity %u ",
                                   rta_getattr_u32(tb[IFLA_PROMISCUITY]));
 
+               if (tb[IFLA_ALLMULTI])
+                       print_uint(PRINT_ANY,
+                                  "allmulti",
+                                  " allmulti %u ",
+                                  rta_getattr_u32(tb[IFLA_ALLMULTI]));
+
                if (tb[IFLA_MIN_MTU])
                        print_uint(PRINT_ANY,
                                   "min_mtu", "minmtu %u ",