All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Gospodarek <gospo@cumulusnetworks.com>
To: netdev@vger.kernel.org, davem@davemloft.net,
	ddutt@cumulusnetworks.com, sfeldma@gmail.com,
	alexander.duyck@gmail.com, hannes@stressinduktion.org,
	stephen@networkplumber.org
Cc: Andy Gospodarek <gospo@cumulusnetworks.com>
Subject: [PATCH net-next 3/3 v5] iproute2: add support to print 'linkdown' nexthop flag
Date: Thu, 18 Jun 2015 11:22:12 -0400	[thread overview]
Message-ID: <1434640932-2681-4-git-send-email-gospo@cumulusnetworks.com> (raw)
In-Reply-To: <1434640932-2681-1-git-send-email-gospo@cumulusnetworks.com>

Signed-off-by: Andy Gospodaerk <gospo@cumulusnetworks.com>
Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com>

---
 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

  parent reply	other threads:[~2015-06-18 15:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 15:22 [PATCH net-next 0/3 v5] changes to make ipv4 routing table aware of next-hop link status Andy Gospodarek
2015-06-18 15:22 ` [PATCH net-next 1/3 v5] net: track link-status of ipv4 nexthops Andy Gospodarek
2015-06-23  9:30   ` David Miller
2015-06-23 11:59     ` Andy Gospodarek
2015-06-18 15:22 ` [PATCH net-next 2/3 v5] net: ipv4 sysctl option to ignore routes when nexthop link is down Andy Gospodarek
2015-06-18 15:22 ` Andy Gospodarek [this message]
2015-06-18 15:43   ` [PATCH net-next 3/3 v5] iproute2: add support to print 'linkdown' nexthop flag Scott Feldman
2015-06-18 15:57     ` Andy Gospodarek
2015-06-18 16:00       ` Scott Feldman
2015-06-18 17:51 ` [PATCH net-next 0/3 v5] changes to make ipv4 routing table aware of next-hop link status Scott Feldman
2015-06-18 19:39   ` Andy Gospodarek
2015-06-21  5:34     ` Scott Feldman
2015-06-21  5:36 ` Scott Feldman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434640932-2681-4-git-send-email-gospo@cumulusnetworks.com \
    --to=gospo@cumulusnetworks.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ddutt@cumulusnetworks.com \
    --cc=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.org \
    --cc=sfeldma@gmail.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.