Blame SOURCES/0027-bridge-fix-reporting-of-IPv6-addresses.patch

4aca6e
From fe16587affe3050d0c3b9438aa6470a7951270fa Mon Sep 17 00:00:00 2001
4aca6e
From: Phil Sutter <psutter@redhat.com>
4aca6e
Date: Tue, 28 Feb 2017 16:09:08 +0100
4aca6e
Subject: [PATCH] bridge: fix reporting of IPv6 addresses
4aca6e
4aca6e
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1417289
4aca6e
Upstream Status: iproute2.git commit 9e763fa5d332f
4aca6e
4aca6e
commit 9e763fa5d332f5839673aaf4a7cae10e97932564
4aca6e
Author: Mike Rapoport <mike.rapoport@ravellosystems.com>
4aca6e
Date:   Thu Mar 20 13:06:10 2014 +0200
4aca6e
4aca6e
    bridge: fix reporting of IPv6 addresses
4aca6e
4aca6e
    Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
4aca6e
---
4aca6e
 bridge/fdb.c | 7 ++++++-
4aca6e
 1 file changed, 6 insertions(+), 1 deletion(-)
4aca6e
4aca6e
diff --git a/bridge/fdb.c b/bridge/fdb.c
4aca6e
index 0191c76..092945b 100644
4aca6e
--- a/bridge/fdb.c
4aca6e
+++ b/bridge/fdb.c
4aca6e
@@ -104,8 +104,13 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
4aca6e
 
4aca6e
 	if (tb[NDA_DST]) {
4aca6e
 		SPRINT_BUF(abuf);
4aca6e
+		int family = AF_INET;
4aca6e
+
4aca6e
+		if (RTA_PAYLOAD(tb[NDA_DST]) == sizeof(struct in6_addr))
4aca6e
+			family = AF_INET6;
4aca6e
+
4aca6e
 		fprintf(fp, "dst %s ",
4aca6e
-			format_host(AF_INET,
4aca6e
+			format_host(family,
4aca6e
 				    RTA_PAYLOAD(tb[NDA_DST]),
4aca6e
 				    RTA_DATA(tb[NDA_DST]),
4aca6e
 				    abuf, sizeof(abuf)));
4aca6e
-- 
4aca6e
1.8.3.1
4aca6e