Netdev List
 help / color / mirror / Atom feed
From: Roopa Prabhu <roopa@cumulusnetworks.com>
To: stephen@networkplumber.org
Cc: netdev@vger.kernel.org, nikolay@cumulusnetworks.com
Subject: [PATCH iproute2] bridge: fdb: print NDA_SRC_VNI if available
Date: Thu, 26 Oct 2017 10:12:55 -0700	[thread overview]
Message-ID: <1509037975-6891-1-git-send-email-roopa@cumulusnetworks.com> (raw)

From: Roopa Prabhu <roopa@cumulusnetworks.com>

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
 bridge/fdb.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/bridge/fdb.c b/bridge/fdb.c
index e5cebf9..081233a 100644
--- a/bridge/fdb.c
+++ b/bridge/fdb.c
@@ -204,6 +204,15 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 				rta_getattr_u32(tb[NDA_VNI]));
 	}
 
+	if (tb[NDA_SRC_VNI]) {
+		if (jw_global)
+			jsonw_uint_field(jw_global, "src_vni",
+					 rta_getattr_u32(tb[NDA_SRC_VNI]));
+		else
+			fprintf(fp, "src_vni %d ",
+				rta_getattr_u32(tb[NDA_SRC_VNI]));
+	}
+
 	if (tb[NDA_IFINDEX]) {
 		unsigned int ifindex = rta_getattr_u32(tb[NDA_IFINDEX]);
 
-- 
2.1.4

             reply	other threads:[~2017-10-26 17:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-26 17:12 Roopa Prabhu [this message]
2017-11-01 21:31 ` [PATCH iproute2] bridge: fdb: print NDA_SRC_VNI if available Stephen Hemminger

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=1509037975-6891-1-git-send-email-roopa@cumulusnetworks.com \
    --to=roopa@cumulusnetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox