From: Andy Gospodarek Date: Tue, 23 Jun 2015 17:45:38 +0000 (-0400) Subject: iproute2: add support to print 'linkdown' nexthop flag X-Git-Tag: v4.2.0~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=528c2551cdb278d58282559067a5d1a47c2f3ebc;p=thirdparty%2Fiproute2.git iproute2: add support to print 'linkdown' nexthop flag Signed-off-by: Andy Gospodaerk Signed-off-by: Dinesh Dutt Acked-by: Scott Feldman --- diff --git a/ip/iproute.c b/ip/iproute.c index a882f12a6..41dea8f8b 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -451,6 +451,8 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) fprintf(fp, "offload "); if (r->rtm_flags & RTM_F_NOTIFY) fprintf(fp, "notify "); + if (r->rtm_flags & RTNH_F_LINKDOWN) + fprintf(fp, "linkdown "); if (tb[RTA_MARK]) { unsigned int mark = *(unsigned int*)RTA_DATA(tb[RTA_MARK]); if (mark) { @@ -670,6 +672,8 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) fprintf(fp, " onlink"); if (nh->rtnh_flags & RTNH_F_PERVASIVE) fprintf(fp, " pervasive"); + if (nh->rtnh_flags & RTNH_F_LINKDOWN) + fprintf(fp, " linkdown"); len -= NLMSG_ALIGN(nh->rtnh_len); nh = RTNH_NEXT(nh); }