]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip-link: Support printing VF trust setting
authorPhil Sutter <phil@nwl.cc>
Thu, 31 Mar 2016 12:43:32 +0000 (14:43 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 11 Apr 2016 22:11:33 +0000 (22:11 +0000)
This adds a new item to VF lines of a PF, stating whether the VF is
trusted or not.

Signed-off-by: Phil Sutter <phil@nwl.cc>
ip/ipaddress.c

index f27d423ca723ab2cadf8cae08b7b16108d58f307..b2e294d29ca23f00b57527e1c0ab33953011c3ba 100644 (file)
@@ -380,6 +380,13 @@ static void print_vfinfo(FILE *fp, struct rtattr *vfinfo)
                else
                        fprintf(fp, ", link-state disable");
        }
+       if (vf[IFLA_VF_TRUST]) {
+               struct ifla_vf_trust *vf_trust = RTA_DATA(vf[IFLA_VF_TRUST]);
+
+               if (vf_trust->setting != -1)
+                       fprintf(fp, ", trust %s",
+                               vf_trust->setting ? "on" : "off");
+       }
        if (vf[IFLA_VF_STATS] && show_stats)
                print_vf_stats64(fp, vf[IFLA_VF_STATS]);
 }