diff options
Diffstat (limited to 'zebra/zebra_evpn.c')
-rw-r--r-- | zebra/zebra_evpn.c | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/zebra/zebra_evpn.c b/zebra/zebra_evpn.c index d7076ccce..27a5a07e4 100644 --- a/zebra/zebra_evpn.c +++ b/zebra/zebra_evpn.c @@ -447,8 +447,6 @@ int zebra_evpn_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn, int zebra_evpn_gw_macip_del(struct interface *ifp, zebra_evpn_t *zevpn, struct ipaddr *ip) { - char buf1[ETHER_ADDR_STRLEN]; - char buf2[INET6_ADDRSTRLEN]; zebra_neigh_t *n = NULL; zebra_mac_t *mac = NULL; @@ -461,11 +459,8 @@ int zebra_evpn_gw_macip_del(struct interface *ifp, zebra_evpn_t *zevpn, mac = zebra_evpn_mac_lookup(zevpn, &n->emac); if (!mac) { if (IS_ZEBRA_DEBUG_VXLAN) - zlog_debug("MAC %s doesn't exist for neigh %s on VNI %u", - prefix_mac2str(&n->emac, - buf1, sizeof(buf1)), - ipaddr2str(ip, buf2, sizeof(buf2)), - zevpn->vni); + zlog_debug("MAC %pEA doesn't exist for neigh %pIA on VNI %u", + &n->emac, ip, zevpn->vni); return -1; } @@ -476,10 +471,9 @@ int zebra_evpn_gw_macip_del(struct interface *ifp, zebra_evpn_t *zevpn, /* only need to delete the entry from bgp if we sent it before */ if (IS_ZEBRA_DEBUG_VXLAN) zlog_debug( - "%u:SVI %s(%u) VNI %u, sending GW MAC %s IP %s del to BGP", + "%u:SVI %s(%u) VNI %u, sending GW MAC %pEA IP %pIA del to BGP", ifp->vrf_id, ifp->name, ifp->ifindex, zevpn->vni, - prefix_mac2str(&(n->emac), buf1, sizeof(buf1)), - ipaddr2str(ip, buf2, sizeof(buf2))); + &n->emac, ip); /* Remove neighbor from BGP. */ zebra_evpn_neigh_send_del_to_client(zevpn->vni, &n->ip, &n->emac, @@ -1321,7 +1315,6 @@ zebra_evpn_process_sync_macip_add(zebra_evpn_t *zevpn, struct ethaddr *macaddr, uint8_t flags, uint32_t seq, esi_t *esi) { struct sync_mac_ip_ctx ctx; - char macbuf[ETHER_ADDR_STRLEN]; char ipbuf[INET6_ADDRSTRLEN]; bool sticky; bool remote_gw; @@ -1334,9 +1327,9 @@ zebra_evpn_process_sync_macip_add(zebra_evpn_t *zevpn, struct ethaddr *macaddr, if (IS_ZEBRA_DEBUG_VXLAN || IS_ZEBRA_DEBUG_EVPN_MH_NEIGH || IS_ZEBRA_DEBUG_EVPN_MH_MAC) zlog_debug( - "Ignore sync-macip vni %u mac %s%s%s%s%s", + "Ignore sync-macip vni %u mac %pEA%s%s%s%s", zevpn->vni, - prefix_mac2str(macaddr, macbuf, sizeof(macbuf)), + macaddr, ipa_len ? " IP " : "", ipa_len ? ipaddr2str(ipaddr, ipbuf, sizeof(ipbuf)) @@ -1455,7 +1448,6 @@ void process_remote_macip_del(vni_t vni, struct ethaddr *macaddr, struct zebra_ns *zns; struct zebra_l2info_vxlan *vxl; struct zebra_vrf *zvrf; - char buf[ETHER_ADDR_STRLEN]; char buf1[INET6_ADDRSTRLEN]; /* Locate EVPN hash entry - expected to exist. */ @@ -1485,9 +1477,8 @@ void process_remote_macip_del(vni_t vni, struct ethaddr *macaddr, if (n && !mac) { zlog_warn( - "Failed to locate MAC %s for neigh %s VNI %u upon remote MACIP DEL", - prefix_mac2str(macaddr, buf, sizeof(buf)), - ipaddr2str(ipaddr, buf1, sizeof(buf1)), vni); + "Failed to locate MAC %pEA for neigh %pIA VNI %u upon remote MACIP DEL", + macaddr, ipaddr, vni); return; } @@ -1503,8 +1494,8 @@ void process_remote_macip_del(vni_t vni, struct ethaddr *macaddr, if (CHECK_FLAG(mac->flags, ZEBRA_MAC_LOCAL) && CHECK_FLAG(mac->flags, ZEBRA_MAC_DEF_GW)) { zlog_warn( - "Ignore remote MACIP DEL VNI %u MAC %s%s%s as MAC is already configured as gateway MAC", - vni, prefix_mac2str(macaddr, buf, sizeof(buf)), + "Ignore remote MACIP DEL VNI %u MAC %pEA%s%s as MAC is already configured as gateway MAC", + vni, macaddr, ipa_len ? " IP " : "", ipa_len ? ipaddr2str(ipaddr, buf1, sizeof(buf1)) : ""); return; @@ -1525,11 +1516,8 @@ void process_remote_macip_del(vni_t vni, struct ethaddr *macaddr, && CHECK_FLAG(mac->flags, ZEBRA_MAC_REMOTE)) { if (IS_ZEBRA_DEBUG_VXLAN) zlog_debug( - "%s: MAC %s (flags 0x%x) is remote and duplicate, read kernel for local entry", - __func__, - prefix_mac2str(macaddr, buf, - sizeof(buf)), - mac->flags); + "%s: MAC %pEA (flags 0x%x) is remote and duplicate, read kernel for local entry", + __func__, macaddr, mac->flags); macfdb_read_specific_mac(zns, zif->brslave_info.br_if, macaddr, vxl->access_vlan); } |