lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1395313570-12545-1-git-send-email-mike.rapoport@ravellosystems.com>
Date:	Thu, 20 Mar 2014 13:06:10 +0200
From:	Mike Rapoport <mike.rapoport@...ellosystems.com>
To:	Stephen Hemminger <stephen@...workplumber.org>
Cc:	netdev@...r.kernel.org,
	Mike Rapoport <mike.rapoport@...ellosystems.com>
Subject: [PATCH iproute2] bridge: fix reporting of IPv6 addresses

Signed-off-by: Mike Rapoport <mike.rapoport@...ellosystems.com>
---
 bridge/fdb.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bridge/fdb.c b/bridge/fdb.c
index e2e53f1..9b720e3 100644
--- a/bridge/fdb.c
+++ b/bridge/fdb.c
@@ -103,8 +103,13 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 
 	if (tb[NDA_DST]) {
 		SPRINT_BUF(abuf);
+		int family = AF_INET;
+
+		if (RTA_PAYLOAD(tb[NDA_DST]) == sizeof(struct in6_addr))
+			family = AF_INET6;
+
 		fprintf(fp, "dst %s ",
-			format_host(AF_INET,
+			format_host(family,
 				    RTA_PAYLOAD(tb[NDA_DST]),
 				    RTA_DATA(tb[NDA_DST]),
 				    abuf, sizeof(abuf)));
-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ