From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Gospodarek Subject: [PATCH net-next 3/3 v5] iproute2: add support to print 'linkdown' nexthop flag Date: Thu, 18 Jun 2015 11:22:12 -0400 Message-ID: <1434640932-2681-4-git-send-email-gospo@cumulusnetworks.com> References: <1434640932-2681-1-git-send-email-gospo@cumulusnetworks.com> Cc: Andy Gospodarek To: netdev@vger.kernel.org, davem@davemloft.net, ddutt@cumulusnetworks.com, sfeldma@gmail.com, alexander.duyck@gmail.com, hannes@stressinduktion.org, stephen@networkplumber.org Return-path: Received: from mail-yk0-f173.google.com ([209.85.160.173]:36863 "EHLO mail-yk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755884AbbFRPXW (ORCPT ); Thu, 18 Jun 2015 11:23:22 -0400 Received: by ykdr198 with SMTP id r198so69141937ykd.3 for ; Thu, 18 Jun 2015 08:23:21 -0700 (PDT) In-Reply-To: <1434640932-2681-1-git-send-email-gospo@cumulusnetworks.com> Sender: netdev-owner@vger.kernel.org List-ID: Signed-off-by: Andy Gospodaerk Signed-off-by: Dinesh Dutt --- ip/iproute.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ip/iproute.c b/ip/iproute.c index 3795baf..3369c49 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); } -- 1.9.3