]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: ipa: show switch id
authorJiri Pirko <jiri@resnulli.us>
Wed, 8 Jul 2015 15:08:18 +0000 (17:08 +0200)
committerStephen Hemminger <shemming@brocade.com>
Mon, 20 Jul 2015 21:59:50 +0000 (14:59 -0700)
We forgot to include this patch somehow. So do it now.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Andy Gospodarek <gospo@cumulusnetworks.com>
ip/ipaddress.c

index 85a81ba6abc6f73acf96c37be528c6ddd6eca056..b7b4e3e67000fdcb8edf049ce9c9507cca5e975a 100644 (file)
@@ -688,6 +688,14 @@ int print_linkinfo(const struct sockaddr_nl *who,
                                      b1, sizeof(b1)));
        }
 
+       if (tb[IFLA_PHYS_SWITCH_ID]) {
+               SPRINT_BUF(b1);
+               fprintf(fp, "switchid %s ",
+                       hexstring_n2a(RTA_DATA(tb[IFLA_PHYS_SWITCH_ID]),
+                                     RTA_PAYLOAD(tb[IFLA_PHYS_SWITCH_ID]),
+                                     b1, sizeof(b1)));
+       }
+
        if (tb[IFLA_OPERSTATE])
                print_operstate(fp, rta_getattr_u8(tb[IFLA_OPERSTATE]));