iproute2: add support to print 'linkdown' nexthop flag
Signed-off-by: Andy Gospodaerk <gospo@cumulusnetworks.com> Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com> Acked-by: Scott Feldman <sfeldma@gmail.com>
This commit is contained in:
parent
6885e3bf8e
commit
528c2551cd
|
|
@ -451,6 +451,8 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
|
||||||
fprintf(fp, "offload ");
|
fprintf(fp, "offload ");
|
||||||
if (r->rtm_flags & RTM_F_NOTIFY)
|
if (r->rtm_flags & RTM_F_NOTIFY)
|
||||||
fprintf(fp, "notify ");
|
fprintf(fp, "notify ");
|
||||||
|
if (r->rtm_flags & RTNH_F_LINKDOWN)
|
||||||
|
fprintf(fp, "linkdown ");
|
||||||
if (tb[RTA_MARK]) {
|
if (tb[RTA_MARK]) {
|
||||||
unsigned int mark = *(unsigned int*)RTA_DATA(tb[RTA_MARK]);
|
unsigned int mark = *(unsigned int*)RTA_DATA(tb[RTA_MARK]);
|
||||||
if (mark) {
|
if (mark) {
|
||||||
|
|
@ -670,6 +672,8 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
|
||||||
fprintf(fp, " onlink");
|
fprintf(fp, " onlink");
|
||||||
if (nh->rtnh_flags & RTNH_F_PERVASIVE)
|
if (nh->rtnh_flags & RTNH_F_PERVASIVE)
|
||||||
fprintf(fp, " pervasive");
|
fprintf(fp, " pervasive");
|
||||||
|
if (nh->rtnh_flags & RTNH_F_LINKDOWN)
|
||||||
|
fprintf(fp, " linkdown");
|
||||||
len -= NLMSG_ALIGN(nh->rtnh_len);
|
len -= NLMSG_ALIGN(nh->rtnh_len);
|
||||||
nh = RTNH_NEXT(nh);
|
nh = RTNH_NEXT(nh);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue