mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 18:09:00 +00:00
bgpd: evpn pip convert ntoa to ntop
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
This commit is contained in:
parent
28ad0501b9
commit
1c97c9fd23
@ -1605,12 +1605,14 @@ static int update_evpn_type5_route(struct bgp *bgp_vrf, struct prefix_evpn *evp,
|
||||
if (bgp_debug_zebra(NULL)) {
|
||||
char buf[ETHER_ADDR_STRLEN];
|
||||
char buf1[PREFIX_STRLEN];
|
||||
char buf2[INET6_ADDRSTRLEN];
|
||||
|
||||
zlog_debug("VRF %s type-5 route evp %s RMAC %s nexthop %s",
|
||||
vrf_id_to_name(bgp_vrf->vrf_id),
|
||||
prefix2str(evp, buf1, sizeof(buf1)),
|
||||
prefix_mac2str(&attr.rmac, buf, sizeof(buf)),
|
||||
inet_ntoa(attr.nexthop));
|
||||
inet_ntop(AF_INET, &attr.nexthop, buf2,
|
||||
INET_ADDRSTRLEN));
|
||||
}
|
||||
|
||||
attr.mp_nexthop_len = BGP_ATTR_NHLEN_IPV4;
|
||||
|
@ -387,7 +387,9 @@ static void display_l3vni(struct vty *vty, struct bgp *bgp_vrf,
|
||||
bgp_vrf->evpn_info->advertise_pip ?
|
||||
"Enabled" : "Disabled");
|
||||
json_object_string_add(json, "sysIP",
|
||||
inet_ntoa(bgp_vrf->evpn_info->pip_ip));
|
||||
inet_ntop(AF_INET,
|
||||
&bgp_vrf->evpn_info->pip_ip,
|
||||
buf1, INET_ADDRSTRLEN));
|
||||
json_object_string_add(json, "sysMac",
|
||||
prefix_mac2str(&bgp_vrf->evpn_info->pip_rmac,
|
||||
buf2, sizeof(buf2)));
|
||||
@ -411,7 +413,8 @@ static void display_l3vni(struct vty *vty, struct bgp *bgp_vrf,
|
||||
vty_out(vty, " Advertise-pip: %s\n",
|
||||
bgp_vrf->evpn_info->advertise_pip ? "Yes" : "No");
|
||||
vty_out(vty, " System-IP: %s\n",
|
||||
inet_ntoa(bgp_vrf->evpn_info->pip_ip));
|
||||
inet_ntop(AF_INET, &bgp_vrf->evpn_info->pip_ip,
|
||||
buf1, INET_ADDRSTRLEN));
|
||||
vty_out(vty, " System-MAC: %s\n",
|
||||
prefix_mac2str(&bgp_vrf->evpn_info->pip_rmac,
|
||||
buf2, sizeof(buf2)));
|
||||
@ -5538,6 +5541,7 @@ void bgp_config_write_evpn_info(struct vty *vty, struct bgp *bgp, afi_t afi,
|
||||
safi_t safi)
|
||||
{
|
||||
char buf1[RD_ADDRSTRLEN];
|
||||
char buf2[INET6_ADDRSTRLEN];
|
||||
|
||||
if (bgp->vnihash) {
|
||||
struct list *vnilist = hash_to_list(bgp->vnihash);
|
||||
@ -5618,7 +5622,9 @@ void bgp_config_write_evpn_info(struct vty *vty, struct bgp *bgp, afi_t afi,
|
||||
if (bgp->evpn_info->advertise_pip) {
|
||||
if (bgp->evpn_info->pip_ip_static.s_addr != INADDR_ANY)
|
||||
vty_out(vty, " advertise-pip ip %s",
|
||||
inet_ntoa(bgp->evpn_info->pip_ip_static));
|
||||
inet_ntop(AF_INET,
|
||||
&bgp->evpn_info->pip_ip_static,
|
||||
buf2, INET_ADDRSTRLEN));
|
||||
if (!is_zero_mac(&(bgp->evpn_info->pip_rmac_static))) {
|
||||
char buf[ETHER_ADDR_STRLEN];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user