Merge pull request #8059 from ton31337/fix/nexthop_ipv4_handling_table_map_apply

bgpd: Print IPv4 nexthop for IPv6 prefixes under bgp_table_map_apply()
This commit is contained in:
Russ White 2021-02-16 11:32:25 -05:00 committed by GitHub
commit dba34d41a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -954,8 +954,11 @@ static bool bgp_table_map_apply(struct route_map *map, const struct prefix *p,
zlog_debug(
"Zebra rmap deny: IPv6 route %pFX nexthop %s",
p,
inet_ntop(AF_INET6, nexthop, buf[1],
sizeof(buf[1])));
nexthop ? inet_ntop(AF_INET6, nexthop, buf[1],
sizeof(buf[1]))
: inet_ntop(AF_INET,
&path->attr->nexthop,
buf[1], sizeof(buf[1])));
}
}
return false;