From: Phil Sutter Date: Thu, 31 Mar 2016 12:43:32 +0000 (+0200) Subject: ip-link: Support printing VF trust setting X-Git-Tag: v4.6.0~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe9322781e6351b5572cbaa8df4dd0e5ec96398a;p=thirdparty%2Fiproute2.git ip-link: Support printing VF trust setting This adds a new item to VF lines of a PF, stating whether the VF is trusted or not. Signed-off-by: Phil Sutter --- diff --git a/ip/ipaddress.c b/ip/ipaddress.c index f27d423ca..b2e294d29 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -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]); }