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>] [day] [month] [year] [list]
Date:   Sat, 05 Jan 2019 13:36:43 +0100
From:   Tobias Jungel <tobias.jungel@...dn.de>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     netdev@...r.kernel.org
Subject: [iproute2 PATCH] ipneigh: print dst for AF_BRIDGE

In case a neighbour message is of family AF_BRIDE the NDA_DST attribute
was not printed so far. With this patch the family is evaluated to pass
the correct family to format_host_rta.

Signed-off-by: Tobias Jungel <tobias.jungel@...dn.de>
---
 ip/ipneigh.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/ip/ipneigh.c b/ip/ipneigh.c
index 6041c467..070b1acd 100644
--- a/ip/ipneigh.c
+++ b/ip/ipneigh.c
@@ -318,10 +318,18 @@ int print_neigh(struct nlmsghdr *n, void *arg)
 
 	if (tb[NDA_DST]) {
 		const char *dst;
+		int family = r->ndm_family;
 
-		dst = format_host_rta(r->ndm_family, tb[NDA_DST]);
+		if (family == AF_BRIDGE) {
+			if (RTA_PAYLOAD(tb[NDA_DST]) == sizeof(struct in6_addr))
+				family = AF_INET6;
+			else
+				family = AF_INET;
+		}
+
+		dst = format_host_rta(family, tb[NDA_DST]);
 		print_color_string(PRINT_ANY,
-				   ifa_family_color(r->ndm_family),
+				   ifa_family_color(family),
 				   "dst", "%s ", dst);
 	}
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ