Commit 9e763fa5 authored by Mike Rapoport's avatar Mike Rapoport Committed by Stephen Hemminger

bridge: fix reporting of IPv6 addresses

Signed-off-by: default avatarMike Rapoport <mike.rapoport@ravellosystems.com>
parent 577e5a53
......@@ -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)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment