]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: add support to print 'linkdown' nexthop flag
authorAndy Gospodarek <gospo@cumulusnetworks.com>
Tue, 23 Jun 2015 17:45:38 +0000 (13:45 -0400)
committerStephen Hemminger <shemming@brocade.com>
Fri, 26 Jun 2015 04:13:47 +0000 (00:13 -0400)
Signed-off-by: Andy Gospodaerk <gospo@cumulusnetworks.com>
Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
Acked-by: Scott Feldman <sfeldma@gmail.com>
ip/iproute.c

index a882f12a658222ce0d52c9d3827c9f008c17d52a..41dea8f8b3f852a78728aea3659b7359f203518c 100644 (file)
@@ -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);
                }