vlanid_t vid = 0;
struct in_addr vtep_ip;
int vid_present = 0, dst_present = 0;
- char buf[ETHER_ADDR_STRLEN];
char vid_buf[20];
char dst_buf[30];
bool sticky;
}
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("Rx %s AF_BRIDGE IF %u%s st 0x%x fl 0x%x MAC %s%s nhg %d",
+ zlog_debug("Rx %s AF_BRIDGE IF %u%s st 0x%x fl 0x%x MAC %pEA%s nhg %d",
nl_msg_type_to_str(h->nlmsg_type),
ndm->ndm_ifindex, vid_present ? vid_buf : "",
- ndm->ndm_state, ndm->ndm_flags,
- prefix_mac2str(&mac, buf, sizeof(buf)),
+ ndm->ndm_state, ndm->ndm_flags, &mac,
dst_present ? dst_buf : "", nhg_id);
/* The interface should exist. */
char buf[256];
} req;
struct zebra_if *br_zif;
- char buf[ETHER_ADDR_STRLEN];
memset(&req, 0, sizeof(req));
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ndmsg));
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
- "%s: Tx family %s IF %s(%u) vrf %s(%u) MAC %s vid %u",
+ "%s: Tx family %s IF %s(%u) vrf %s(%u) MAC %pEA vid %u",
__func__, nl_family_to_str(req.ndm.ndm_family),
br_if->name, br_if->ifindex,
- vrf_id_to_name(br_if->vrf_id), br_if->vrf_id,
- prefix_mac2str(mac, buf, sizeof(buf)), vid);
+ vrf_id_to_name(br_if->vrf_id), br_if->vrf_id, mac, vid);
return netlink_request(&zns->netlink_cmd, &req);
}
SET_IPADDR_V4(&vtep_ip);
if (IS_ZEBRA_DEBUG_KERNEL) {
- char ipbuf[PREFIX_STRLEN];
- char buf[ETHER_ADDR_STRLEN];
char vid_buf[20];
const struct ethaddr *mac = dplane_ctx_mac_get_addr(ctx);
vid_buf[0] = '\0';
zlog_debug(
- "Tx %s family %s IF %s(%u)%s %sMAC %s dst %s nhg %u%s%s%s%s%s",
+ "Tx %s family %s IF %s(%u)%s %sMAC %pEA dst %pIA nhg %u%s%s%s%s%s",
nl_msg_type_to_str(cmd), nl_family_to_str(AF_BRIDGE),
dplane_ctx_get_ifname(ctx), dplane_ctx_get_ifindex(ctx),
vid_buf, dplane_ctx_mac_is_sticky(ctx) ? "sticky " : "",
- prefix_mac2str(mac, buf, sizeof(buf)),
- ipaddr2str(&vtep_ip, ipbuf, sizeof(ipbuf)), nhg_id,
+ mac, &vtep_ip, nhg_id,
(update_flags & DPLANE_MAC_REMOTE) ? " rem" : "",
(update_flags & DPLANE_MAC_WAS_STATIC) ? " clr_sync"
: "",
struct ipaddr ip;
struct vrf *vrf;
char buf[ETHER_ADDR_STRLEN];
- char buf2[INET6_ADDRSTRLEN];
int mac_present = 0;
bool is_ext;
bool is_router;
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
- "Rx %s family %s IF %s(%u) vrf %s(%u) IP %s MAC %s state 0x%x flags 0x%x ext_flags 0x%x",
+ "Rx %s family %s IF %s(%u) vrf %s(%u) IP %pIA MAC %s state 0x%x flags 0x%x ext_flags 0x%x",
nl_msg_type_to_str(h->nlmsg_type),
nl_family_to_str(ndm->ndm_family), ifp->name,
ndm->ndm_ifindex, VRF_LOGNAME(vrf), ifp->vrf_id,
- ipaddr2str(&ip, buf2, sizeof(buf2)),
+ &ip,
mac_present
? prefix_mac2str(&mac, buf, sizeof(buf))
: "",
}
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("Rx %s family %s IF %s(%u) vrf %s(%u) IP %s",
+ zlog_debug("Rx %s family %s IF %s(%u) vrf %s(%u) IP %pIA",
nl_msg_type_to_str(h->nlmsg_type),
nl_family_to_str(ndm->ndm_family), ifp->name,
ndm->ndm_ifindex, VRF_LOGNAME(vrf), ifp->vrf_id,
- ipaddr2str(&ip, buf2, sizeof(buf2)));
+ &ip);
/* Process the delete - it may result in re-adding the neighbor if it is
* a valid "remote" neighbor.
nl_attr_put(&req.n, sizeof(req), NDA_DST, &ip->ip.addr, ipa_len);
- if (IS_ZEBRA_DEBUG_KERNEL) {
- char buf[INET6_ADDRSTRLEN];
-
- zlog_debug("%s: Tx %s family %s IF %u IP %s flags 0x%x",
+ if (IS_ZEBRA_DEBUG_KERNEL)
+ zlog_debug("%s: Tx %s family %s IF %u IP %pIA flags 0x%x",
__func__, nl_msg_type_to_str(type),
- nl_family_to_str(req.ndm.ndm_family), ifindex,
- ipaddr2str(ip, buf, sizeof(buf)), req.n.nlmsg_flags);
- }
+ nl_family_to_str(req.ndm.ndm_family), ifindex, ip,
+ req.n.nlmsg_flags);
return netlink_request(&zns->netlink_cmd, &req);
}
int ret = 0;
struct zebra_ns *zns;
struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(vlan_if->vrf_id);
- char buf[INET6_ADDRSTRLEN];
struct zebra_dplane_info dp_info;
zns = zvrf->zns;
zebra_dplane_info_from_zns(&dp_info, zns, true /*is_cmd*/);
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("%s: neigh request IF %s(%u) IP %s vrf %s(%u)",
- __func__, vlan_if->name, vlan_if->ifindex,
- ipaddr2str(ip, buf, sizeof(buf)),
+ zlog_debug("%s: neigh request IF %s(%u) IP %pIA vrf %s(%u)",
+ __func__, vlan_if->name, vlan_if->ifindex, ip,
vrf_id_to_name(vlan_if->vrf_id), vlan_if->vrf_id);
ret = netlink_request_specific_neigh_in_vlan(zns, RTM_GETNEIGH, ip,
if (update_flags & DPLANE_NEIGH_SET_STATIC)
ext_flags |= NTF_E_MH_PEER_SYNC;
}
- if (IS_ZEBRA_DEBUG_KERNEL) {
- char buf[INET6_ADDRSTRLEN];
- char buf2[ETHER_ADDR_STRLEN];
-
+ if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
- "Tx %s family %s IF %s(%u) Neigh %s MAC %s flags 0x%x state 0x%x %sext_flags 0x%x",
+ "Tx %s family %s IF %s(%u) Neigh %pIA MAC %pEA flags 0x%x state 0x%x %sext_flags 0x%x",
nl_msg_type_to_str(cmd), nl_family_to_str(family),
dplane_ctx_get_ifname(ctx), dplane_ctx_get_ifindex(ctx),
- ipaddr2str(ip, buf, sizeof(buf)),
- mac ? prefix_mac2str(mac, buf2, sizeof(buf2)) : "null",
- flags, state, ext ? "ext " : "", ext_flags);
- }
+ ip, mac, flags, state, ext ? "ext " : "", ext_flags);
return netlink_neigh_update_msg_encode(
ctx, cmd, mac, ip, true, family, RTN_UNICAST, flags, state,
int ret;
struct zebra_dplane_ctx *ctx = NULL;
- if (IS_ZEBRA_DEBUG_DPLANE_DETAIL) {
- char buf1[ETHER_ADDR_STRLEN], buf2[PREFIX_STRLEN];
-
- zlog_debug("init mac ctx %s: mac %s, ifp %s, vtep %s",
- dplane_op2str(op),
- prefix_mac2str(mac, buf1, sizeof(buf1)),
- ifp->name,
- inet_ntop(AF_INET, &vtep_ip, buf2, sizeof(buf2)));
- }
+ if (IS_ZEBRA_DEBUG_DPLANE_DETAIL)
+ zlog_debug("init mac ctx %s: mac %pEA, ifp %s, vtep %pI4",
+ dplane_op2str(op), mac, ifp->name, &vtep_ip);
ctx = dplane_ctx_alloc();
ctx->zd_op = op;
struct zebra_dplane_ctx *ctx = NULL;
struct zebra_ns *zns;
- if (IS_ZEBRA_DEBUG_DPLANE_DETAIL) {
- char buf1[ETHER_ADDR_STRLEN], buf2[PREFIX_STRLEN];
-
- zlog_debug("init neigh ctx %s: ifp %s, mac %s, ip %s",
- dplane_op2str(op), ifp->name,
- prefix_mac2str(mac, buf1, sizeof(buf1)),
- ipaddr2str(ip, buf2, sizeof(buf2)));
- }
+ if (IS_ZEBRA_DEBUG_DPLANE_DETAIL)
+ zlog_debug("init neigh ctx %s: ifp %s, mac %pEA, ip %pIA",
+ dplane_op2str(op), ifp->name, mac, ip);
ctx = dplane_ctx_alloc();
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;
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;
}
/* 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,
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;
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))
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. */
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;
}
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;
&& 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);
}
zebra_evpn_t *zevpn = NULL;
struct listnode *node = NULL;
zebra_neigh_t *nbr = NULL;
- char buf[ETHER_ADDR_STRLEN];
mac = THREAD_ARG(t);
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "%s: duplicate addr mac %s flags %slearn count %u host count %u auto recovery expired",
- __func__,
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ "%s: duplicate addr mac %pEA flags %slearn count %u host count %u auto recovery expired",
+ __func__, &mac->macaddr,
zebra_evpn_zebra_mac_flag_dump(mac, mac_buf,
sizeof(mac_buf)),
mac->dad_count, listcount(mac->neigh_list));
zebra_neigh_t *nbr;
struct listnode *node = NULL;
struct timeval elapsed = {0, 0};
- char buf[ETHER_ADDR_STRLEN];
- char buf1[INET6_ADDRSTRLEN];
bool reset_params = false;
if (!(zebra_evpn_do_dup_addr_detect(zvrf) && do_dad))
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "%s: duplicate addr MAC %s flags %sskip update to client, learn count %u recover time %u",
- __func__,
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ "%s: duplicate addr MAC %pEA flags %sskip update to client, learn count %u recover time %u",
+ __func__, &mac->macaddr,
zebra_evpn_zebra_mac_flag_dump(mac, mac_buf,
sizeof(mac_buf)),
mac->dad_count, zvrf->dad_freeze_time);
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "%s: duplicate addr MAC %s flags %sdetection time passed, reset learn count %u",
- __func__,
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ "%s: duplicate addr MAC %pEA flags %sdetection time passed, reset learn count %u",
+ __func__, &mac->macaddr,
zebra_evpn_zebra_mac_flag_dump(mac, mac_buf,
sizeof(mac_buf)),
mac->dad_count);
if (mac->dad_count >= zvrf->dad_max_moves) {
flog_warn(EC_ZEBRA_DUP_MAC_DETECTED,
- "VNI %u: MAC %s detected as duplicate during %s VTEP %pI4",
- mac->zevpn->vni,
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ "VNI %u: MAC %pEA detected as duplicate during %s VTEP %pI4",
+ mac->zevpn->vni, &mac->macaddr,
is_local ? "local update, last" :
"remote update, from", &vtep_ip);
nbr->dad_dup_detect_time = monotime(NULL);
flog_warn(EC_ZEBRA_DUP_IP_INHERIT_DETECTED,
- "VNI %u: MAC %s IP %s detected as duplicate during %s update, inherit duplicate from MAC",
- mac->zevpn->vni,
- prefix_mac2str(&mac->macaddr,
- buf, sizeof(buf)),
- ipaddr2str(&nbr->ip, buf1, sizeof(buf1)),
+ "VNI %u: MAC %pEA IP %pIA detected as duplicate during %s update, inherit duplicate from MAC",
+ mac->zevpn->vni, &mac->macaddr, &nbr->ip,
is_local ? "local" : "remote");
}
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "%s: duplicate addr MAC %s flags %sauto recovery time %u start",
- __func__,
- prefix_mac2str(&mac->macaddr, buf,
- sizeof(buf)),
+ "%s: duplicate addr MAC %pEA flags %sauto recovery time %u start",
+ __func__, &mac->macaddr,
zebra_evpn_zebra_mac_flag_dump(
mac, mac_buf, sizeof(mac_buf)),
zvrf->dad_freeze_time);
uint32_t seq, int state,
struct zebra_evpn_es *es, uint16_t cmd)
{
- char buf[ETHER_ADDR_STRLEN];
- char buf2[INET6_ADDRSTRLEN];
int ipa_len;
struct zserv *client = NULL;
struct stream *s = NULL;
char flag_buf[MACIP_BUF_SIZE];
zlog_debug(
- "Send MACIP %s f %s MAC %s IP %s seq %u L2-VNI %u ESI %s to %s",
+ "Send MACIP %s f %s MAC %pEA IP %pIA seq %u L2-VNI %u ESI %s to %s",
(cmd == ZEBRA_MACIP_ADD) ? "Add" : "Del",
zclient_evpn_dump_macip_flags(flags, flag_buf,
sizeof(flag_buf)),
- prefix_mac2str(macaddr, buf, sizeof(buf)),
- ipaddr2str(ip, buf2, sizeof(buf2)), seq, vni,
+ macaddr, ip, seq, vni,
es ? es->esi_str : "-",
zebra_route_string(client->proto));
}
mac->uptime = monotime(NULL);
if (IS_ZEBRA_DEBUG_VXLAN || IS_ZEBRA_DEBUG_EVPN_MH_MAC) {
- char buf[ETHER_ADDR_STRLEN];
char mac_buf[MAC_BUF_SIZE];
- zlog_debug("%s: MAC %s flags %s", __func__,
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ zlog_debug("%s: MAC %pEA flags %s", __func__,
+ &mac->macaddr,
zebra_evpn_zebra_mac_flag_dump(mac, mac_buf,
sizeof(mac_buf)));
}
zebra_mac_t *tmp_mac;
if (IS_ZEBRA_DEBUG_VXLAN || IS_ZEBRA_DEBUG_EVPN_MH_MAC) {
- char buf[ETHER_ADDR_STRLEN];
char mac_buf[MAC_BUF_SIZE];
- zlog_debug("%s: MAC %s flags %s", __func__,
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ zlog_debug("%s: MAC %pEA flags %s", __func__,
+ &mac->macaddr,
zebra_evpn_zebra_mac_flag_dump(mac, mac_buf,
sizeof(mac_buf)));
}
else if ((wctx->flags & DEL_LOCAL_MAC) && (mac->flags & ZEBRA_MAC_AUTO)
&& !listcount(mac->neigh_list)) {
if (IS_ZEBRA_DEBUG_VXLAN) {
- char buf[ETHER_ADDR_STRLEN];
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "%s: Del MAC %s flags %s", __func__,
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ "%s: Del MAC %pEA flags %s", __func__,
+ &mac->macaddr,
zebra_evpn_zebra_mac_flag_dump(
mac, mac_buf, sizeof(mac_buf)));
}
bool new_bgp_ready;
bool old_static;
bool new_static;
- char macbuf[ETHER_ADDR_STRLEN];
mac = THREAD_ARG(t);
/* the purpose of the hold timer is to age out the peer-active
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "sync-mac vni %u mac %s es %s %shold expired",
- mac->zevpn->vni,
- prefix_mac2str(&mac->macaddr, macbuf, sizeof(macbuf)),
+ "sync-mac vni %u mac %pEA es %s %shold expired",
+ mac->zevpn->vni, &mac->macaddr,
mac->es ? mac->es->esi_str : "-",
zebra_evpn_zebra_mac_flag_dump(mac, mac_buf,
sizeof(mac_buf)));
static inline void zebra_evpn_mac_start_hold_timer(zebra_mac_t *mac)
{
- char macbuf[ETHER_ADDR_STRLEN];
-
if (mac->hold_timer)
return;
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "sync-mac vni %u mac %s es %s %shold started",
- mac->zevpn->vni,
- prefix_mac2str(&mac->macaddr, macbuf, sizeof(macbuf)),
+ "sync-mac vni %u mac %pEA es %s %shold started",
+ mac->zevpn->vni, &mac->macaddr,
mac->es ? mac->es->esi_str : "-",
zebra_evpn_zebra_mac_flag_dump(mac, mac_buf,
sizeof(mac_buf)));
void zebra_evpn_mac_stop_hold_timer(zebra_mac_t *mac)
{
- char macbuf[ETHER_ADDR_STRLEN];
-
if (!mac->hold_timer)
return;
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "sync-mac vni %u mac %s es %s %shold stopped",
- mac->zevpn->vni,
- prefix_mac2str(&mac->macaddr, macbuf, sizeof(macbuf)),
+ "sync-mac vni %u mac %pEA es %s %shold stopped",
+ mac->zevpn->vni, &mac->macaddr,
mac->es ? mac->es->esi_str : "-",
zebra_evpn_zebra_mac_flag_dump(mac, mac_buf,
sizeof(mac_buf)));
void zebra_evpn_sync_mac_del(zebra_mac_t *mac)
{
- char macbuf[ETHER_ADDR_STRLEN];
bool old_static;
bool new_static;
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "sync-mac del vni %u mac %s es %s seq %d f %s",
- mac->zevpn->vni,
- prefix_mac2str(&mac->macaddr, macbuf, sizeof(macbuf)),
+ "sync-mac del vni %u mac %pEA es %s seq %d f %s",
+ mac->zevpn->vni, &mac->macaddr,
mac->es ? mac->es->esi_str : "-", mac->loc_seq,
zebra_evpn_zebra_mac_flag_dump(mac, mac_buf,
sizeof(mac_buf)));
struct ipaddr *ipaddr,
bool sync)
{
- char macbuf[ETHER_ADDR_STRLEN];
char ipbuf[INET6_ADDRSTRLEN];
uint32_t tmp_seq;
const char *n_type;
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "%s-macip accept vni %u %s-mac %s%s%s lower seq %u f %s",
+ "%s-macip accept vni %u %s-mac %pEA%s%s lower seq %u f %s",
sync ? "sync" : "rem", zevpn->vni,
n_type,
- prefix_mac2str(&mac->macaddr, macbuf,
- sizeof(macbuf)),
+ &mac->macaddr,
ipa_len ? " IP " : "",
ipa_len ? ipaddr2str(ipaddr, ipbuf,
sizeof(ipbuf))
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "%s-macip ignore vni %u %s-mac %s%s%s as existing has higher seq %u f %s",
+ "%s-macip ignore vni %u %s-mac %pEA%s%s as existing has higher seq %u f %s",
sync ? "sync" : "rem", zevpn->vni, n_type,
- prefix_mac2str(&mac->macaddr, macbuf,
- sizeof(macbuf)),
+ &mac->macaddr,
ipa_len ? " IP " : "",
ipa_len ? ipaddr2str(ipaddr, ipbuf,
sizeof(ipbuf))
bool seq_change = false;
bool es_change = false;
uint32_t tmp_seq;
- char macbuf[ETHER_ADDR_STRLEN];
char ipbuf[INET6_ADDRSTRLEN];
bool old_local = false;
bool old_bgp_ready;
if (sticky || remote_gw) {
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
zlog_debug(
- "Ignore sync-macip vni %u mac %s%s%s%s%s",
- zevpn->vni,
- prefix_mac2str(macaddr, macbuf,
- sizeof(macbuf)),
+ "Ignore sync-macip vni %u mac %pEA%s%s%s%s",
+ zevpn->vni, macaddr,
ipa_len ? " IP " : "",
ipa_len ? ipaddr2str(ipaddr, ipbuf,
sizeof(ipbuf))
omac.flags = old_flags;
zlog_debug(
- "sync-mac vni %u mac %s old_f %snew_f %s",
- zevpn->vni,
- prefix_mac2str(macaddr, macbuf, sizeof(macbuf)),
+ "sync-mac vni %u mac %pEA old_f %snew_f %s",
+ zevpn->vni, macaddr,
zebra_evpn_zebra_mac_flag_dump(
&omac, omac_buf, sizeof(omac_buf)),
zebra_evpn_zebra_mac_flag_dump(
if (IS_ZEBRA_DEBUG_EVPN_MH_MAC) {
char mac_buf[MAC_BUF_SIZE];
- zlog_debug("sync-mac %s vni %u mac %s es %s seq %d f %s%s%s",
- ctx->mac_created ? "created" : "updated", zevpn->vni,
- prefix_mac2str(macaddr, macbuf, sizeof(macbuf)),
+ zlog_debug("sync-mac %s vni %u mac %pEA es %s seq %d f %s%s%s",
+ ctx->mac_created ? "created" : "updated",
+ zevpn->vni, macaddr,
mac->es ? mac->es->esi_str : "-", mac->loc_seq,
zebra_evpn_zebra_mac_flag_dump(mac, mac_buf,
sizeof(mac_buf)),
struct in_addr vtep_ip, uint8_t flags,
uint32_t seq, esi_t *esi)
{
- char buf[ETHER_ADDR_STRLEN];
char buf1[INET6_ADDRSTRLEN];
bool sticky;
bool remote_gw;
&& CHECK_FLAG(flags, ZEBRA_MACIP_TYPE_GW)) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "Ignore remote MACIP ADD VNI %u MAC %s%s%s as MAC is already configured as gateway MAC",
- zevpn->vni,
- prefix_mac2str(macaddr, buf, sizeof(buf)),
+ "Ignore remote MACIP ADD VNI %u MAC %pEA%s%s as MAC is already configured as gateway MAC",
+ zevpn->vni, macaddr,
ipa_len ? " IP " : "",
ipa_len ? ipaddr2str(ipaddr, buf1, sizeof(buf1))
: "");
mac = zebra_evpn_mac_add(zevpn, macaddr);
if (!mac) {
zlog_warn(
- "Failed to add MAC %s VNI %u Remote VTEP %pI4",
- prefix_mac2str(macaddr, buf,
- sizeof(buf)),
- zevpn->vni, &vtep_ip);
+ "Failed to add MAC %pEA VNI %u Remote VTEP %pI4",
+ macaddr, zevpn->vni, &vtep_ip);
return -1;
}
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "sync-mac->remote vni %u mac %s es %s seq %d f %s",
- zevpn->vni,
- prefix_mac2str(macaddr, buf,
- sizeof(buf)),
+ "sync-mac->remote vni %u mac %pEA es %s seq %d f %s",
+ zevpn->vni, macaddr,
mac->es ? mac->es->esi_str : "-",
mac->loc_seq,
zebra_evpn_zebra_mac_flag_dump(
bool sticky, bool local_inactive,
bool dp_static, zebra_mac_t *mac)
{
- char buf[ETHER_ADDR_STRLEN];
bool mac_sticky = false;
bool inform_client = false;
bool upd_neigh = false;
if (!mac) {
if (IS_ZEBRA_DEBUG_VXLAN || IS_ZEBRA_DEBUG_EVPN_MH_MAC)
zlog_debug(
- "ADD %sMAC %s intf %s(%u) VID %u -> VNI %u%s",
- sticky ? "sticky " : "",
- prefix_mac2str(macaddr, buf, sizeof(buf)),
+ "ADD %sMAC %pEA intf %s(%u) VID %u -> VNI %u%s",
+ sticky ? "sticky " : "", macaddr,
ifp->name, ifp->ifindex, vid, zevpn->vni,
local_inactive ? " local-inactive" : "");
if (!mac) {
flog_err(
EC_ZEBRA_MAC_ADD_FAILED,
- "Failed to add MAC %s intf %s(%u) VID %u VNI %u",
- prefix_mac2str(macaddr, buf, sizeof(buf)),
- ifp->name, ifp->ifindex, vid, zevpn->vni);
+ "Failed to add MAC %pEA intf %s(%u) VID %u VNI %u",
+ macaddr, ifp->name, ifp->ifindex, vid,
+ zevpn->vni);
return -1;
}
SET_FLAG(mac->flags, ZEBRA_MAC_LOCAL);
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "UPD %sMAC %s intf %s(%u) VID %u -> VNI %u %scurFlags %s",
- sticky ? "sticky " : "",
- prefix_mac2str(macaddr, buf, sizeof(buf)),
+ "UPD %sMAC %pEA intf %s(%u) VID %u -> VNI %u %scurFlags %s",
+ sticky ? "sticky " : "", macaddr,
ifp->name, ifp->ifindex, vid, zevpn->vni,
local_inactive ? "local-inactive " : "",
zebra_evpn_zebra_mac_flag_dump(
&& dp_static == old_static && !es_change) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- " Add/Update %sMAC %s intf %s(%u) VID %u -> VNI %u%s, "
+ " Add/Update %sMAC %pEA intf %s(%u) VID %u -> VNI %u%s, "
"entry exists and has not changed ",
- sticky ? "sticky " : "",
- prefix_mac2str(macaddr, buf,
- sizeof(buf)),
- ifp->name, ifp->ifindex, vid,
- zevpn->vni,
+ sticky ? "sticky " : "",
+ macaddr, ifp->name,
+ ifp->ifindex, vid, zevpn->vni,
local_inactive
? " local_inactive"
: "");
if (CHECK_FLAG(mac->flags, ZEBRA_MAC_STICKY)) {
flog_warn(
EC_ZEBRA_STICKY_MAC_ALREADY_LEARNT,
- "MAC %s already learnt as remote sticky MAC behind VTEP %pI4 VNI %u",
- prefix_mac2str(macaddr, buf,
- sizeof(buf)),
+ "MAC %pEA already learnt as remote sticky MAC behind VTEP %pI4 VNI %u",
+ macaddr,
&mac->fwd_info.r_vtep_ip,
zevpn->vni);
return 0;
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "local mac vni %u mac %s es %s seq %d f %s%s",
- zevpn->vni,
- prefix_mac2str(macaddr, buf, sizeof(buf)),
+ "local mac vni %u mac %pEA es %s seq %d f %s%s",
+ zevpn->vni, macaddr,
mac->es ? mac->es->esi_str : "", mac->loc_seq,
zebra_evpn_zebra_mac_flag_dump(mac, mac_buf,
sizeof(mac_buf)),
int zebra_evpn_del_local_mac(zebra_evpn_t *zevpn, zebra_mac_t *mac,
bool clear_static)
{
- char buf[ETHER_ADDR_STRLEN];
bool old_bgp_ready;
bool new_bgp_ready;
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("DEL MAC %s VNI %u seq %u flags 0x%x nbr count %u",
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
- zevpn->vni, mac->loc_seq, mac->flags,
+ zlog_debug("DEL MAC %pEA VNI %u seq %u flags 0x%x nbr count %u",
+ &mac->macaddr, zevpn->vni, mac->loc_seq, mac->flags,
listcount(mac->neigh_list));
old_bgp_ready = zebra_evpn_mac_is_ready_for_bgp(mac->flags);
char mac_buf[MAC_BUF_SIZE];
zlog_debug(
- "re-add sync-mac vni %u mac %s es %s seq %d f %s",
- zevpn->vni,
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ "re-add sync-mac vni %u mac %pEA es %s seq %d f %s",
+ zevpn->vni, &mac->macaddr,
mac->es ? mac->es->esi_str : "-", mac->loc_seq,
zebra_evpn_zebra_mac_flag_dump(
mac, mac_buf, sizeof(mac_buf)));
struct ethaddr *macaddr, vlanid_t vlan_id,
bool def_gw)
{
- char buf[ETHER_ADDR_STRLEN];
zebra_mac_t *mac;
ns_id_t local_ns_id = NS_DEFAULT;
struct zebra_vrf *zvrf;
mac = zebra_evpn_mac_add(zevpn, macaddr);
if (!mac) {
flog_err(EC_ZEBRA_MAC_ADD_FAILED,
- "Failed to add MAC %s intf %s(%u) VID %u",
- prefix_mac2str(macaddr, buf, sizeof(buf)),
- ifp->name, ifp->ifindex, vlan_id);
+ "Failed to add MAC %pEA intf %s(%u) VID %u",
+ macaddr, ifp->name, ifp->ifindex, vlan_id);
return -1;
}
}
zebra_mac_t *mac,
bool send_mac_update)
{
- char macbuf[ETHER_ADDR_STRLEN];
- char ipbuf[INET6_ADDRSTRLEN];
bool old_static;
bool new_static;
new_static = zebra_evpn_mac_is_static(mac);
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
zlog_debug(
- "sync-neigh ref mac vni %u ip %s mac %s ref %d",
- n->zevpn->vni,
- ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf,
- sizeof(macbuf)),
+ "sync-neigh ref mac vni %u ip %pIA mac %pEA ref %d",
+ n->zevpn->vni, &n->ip, &n->emac,
mac->sync_neigh_cnt);
if ((old_static != new_static) && send_mac_update)
/* program the local mac in the kernel */
bool force_clear_static,
const char *caller)
{
- char macbuf[ETHER_ADDR_STRLEN];
- char ipbuf[INET6_ADDRSTRLEN];
struct zebra_ns *zns;
struct interface *ifp;
bool set_static;
if (!ifp) {
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
zlog_debug(
- "%s: dp-install sync-neigh vni %u ip %s mac %s if %d f 0x%x skipped",
- caller, n->zevpn->vni,
- ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf,
- sizeof(macbuf)),
+ "%s: dp-install sync-neigh vni %u ip %pIA mac %pEA if %d f 0x%x skipped",
+ caller, n->zevpn->vni, &n->ip, &n->emac,
n->ifindex, n->flags);
return;
}
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
zlog_debug(
- "%s: dp-install sync-neigh vni %u ip %s mac %s if %s(%d) f 0x%x%s%s%s",
- caller, n->zevpn->vni,
- ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf, sizeof(macbuf)),
+ "%s: dp-install sync-neigh vni %u ip %pIA mac %pEA if %s(%d) f 0x%x%s%s%s",
+ caller, n->zevpn->vni, &n->ip, &n->emac,
ifp->name, n->ifindex, n->flags,
set_router ? " router" : "",
set_static ? " static" : "",
zebra_mac_t *mac = n->mac;
bool old_mac_static;
bool new_mac_static;
- char macbuf[ETHER_ADDR_STRLEN];
- char ipbuf[INET6_ADDRSTRLEN];
if (old_n_static == new_n_static)
return;
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
zlog_debug(
- "sync-neigh ref-chg vni %u ip %s mac %s f 0x%x %d%s%s%s%s by %s",
- n->zevpn->vni, ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf, sizeof(macbuf)),
- n->flags, mac->sync_neigh_cnt,
+ "sync-neigh ref-chg vni %u ip %pIA mac %pEA f 0x%x %d%s%s%s%s by %s",
+ n->zevpn->vni, &n->ip, &n->emac, n->flags,
+ mac->sync_neigh_cnt,
old_n_static ? " old_n_static" : "",
new_n_static ? " new_n_static" : "",
old_mac_static ? " old_mac_static" : "",
bool new_bgp_ready;
bool old_n_static;
bool new_n_static;
- char macbuf[ETHER_ADDR_STRLEN];
- char ipbuf[INET6_ADDRSTRLEN];
n = THREAD_ARG(t);
/* the purpose of the hold timer is to age out the peer-active
new_n_static = zebra_evpn_neigh_is_static(n);
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
- zlog_debug("sync-neigh vni %u ip %s mac %s 0x%x hold expired",
- n->zevpn->vni,
- ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf, sizeof(macbuf)),
- n->flags);
+ zlog_debug("sync-neigh vni %u ip %pIA mac %pEA 0x%x hold expired",
+ n->zevpn->vni, &n->ip, &n->emac, n->flags);
/* re-program the local neigh in the dataplane if the neigh is no
* longer static
static inline void zebra_evpn_neigh_start_hold_timer(zebra_neigh_t *n)
{
- char macbuf[ETHER_ADDR_STRLEN];
- char ipbuf[INET6_ADDRSTRLEN];
-
if (n->hold_timer)
return;
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
- zlog_debug("sync-neigh vni %u ip %s mac %s 0x%x hold start",
- n->zevpn->vni,
- ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf, sizeof(macbuf)),
- n->flags);
+ zlog_debug("sync-neigh vni %u ip %pIA mac %pEA 0x%x hold start",
+ n->zevpn->vni, &n->ip, &n->emac, n->flags);
thread_add_timer(zrouter.master, zebra_evpn_neigh_hold_exp_cb, n,
zmh_info->neigh_hold_time, &n->hold_timer);
}
{
zebra_mac_t *mac = n->mac;
zebra_evpn_t *zevpn = n->zevpn;
- char macbuf[ETHER_ADDR_STRLEN];
- char ipbuf[INET6_ADDRSTRLEN];
bool old_static;
bool new_static;
new_static = zebra_evpn_mac_is_static(mac);
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
zlog_debug(
- "sync-neigh deref mac vni %u ip %s mac %s ref %d",
- n->zevpn->vni,
- ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf,
- sizeof(macbuf)),
+ "sync-neigh deref mac vni %u ip %pIA mac %pEA ref %d",
+ n->zevpn->vni, &n->ip, &n->emac,
mac->sync_neigh_cnt);
if ((old_static != new_static) && send_mac_update)
/* program the local mac in the kernel */
struct ethaddr *macaddr, uint32_t seq,
bool sync)
{
- char macbuf[ETHER_ADDR_STRLEN];
- char ipbuf[INET6_ADDRSTRLEN];
uint32_t tmp_seq;
const char *n_type;
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH
|| IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "%s-macip accept vni %u %s mac %s IP %s lower seq %u f 0x%x",
+ "%s-macip accept vni %u %s mac %pEA IP %pIA lower seq %u f 0x%x",
sync ? "sync" : "remote", zevpn->vni,
- n_type,
- prefix_mac2str(macaddr, macbuf,
- sizeof(macbuf)),
- ipaddr2str(&n->ip, ipbuf,
- sizeof(ipbuf)),
+ n_type, macaddr, &n->ip,
tmp_seq, n->flags);
return true;
}
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH || IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "%s-macip ignore vni %u %s mac %s IP %s as existing has higher seq %u f 0x%x",
+ "%s-macip ignore vni %u %s mac %pEA IP %pIA as existing has higher seq %u f 0x%x",
sync ? "sync" : "remote", zevpn->vni, n_type,
- prefix_mac2str(macaddr, macbuf, sizeof(macbuf)),
- ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- tmp_seq, n->flags);
+ macaddr, &n->ip, tmp_seq, n->flags);
return false;
}
{
bool old_n_static;
bool new_n_static;
- char macbuf[ETHER_ADDR_STRLEN];
- char ipbuf[INET6_ADDRSTRLEN];
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
- zlog_debug("sync-neigh del vni %u ip %s mac %s f 0x%x",
- n->zevpn->vni,
- ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf, sizeof(macbuf)),
- n->flags);
+ zlog_debug("sync-neigh del vni %u ip %pIA mac %pEA f 0x%x",
+ n->zevpn->vni, &n->ip, &n->emac, n->flags);
old_n_static = zebra_evpn_neigh_is_static(n);
UNSET_FLAG(n->flags, ZEBRA_NEIGH_ES_PEER_PROXY);
bool old_mac_static;
bool new_mac_static;
bool set_dp_inactive = false;
- char macbuf[ETHER_ADDR_STRLEN];
- char ipbuf[INET6_ADDRSTRLEN];
bool created;
ifindex_t ifindex = 0;
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH && (old_flags != n->flags))
zlog_debug(
- "sync-neigh vni %u ip %s mac %s old_f 0x%x new_f 0x%x",
- n->zevpn->vni,
- ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf,
- sizeof(macbuf)),
+ "sync-neigh vni %u ip %pIA mac %pEA old_f 0x%x new_f 0x%x",
+ n->zevpn->vni, &n->ip, &n->emac,
old_flags, n->flags);
new_n_static = zebra_evpn_neigh_is_static(n);
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
zlog_debug(
- "sync-neigh %s vni %u ip %s mac %s if %s(%d) seq %d f 0x%x%s%s",
+ "sync-neigh %s vni %u ip %pIA mac %pEA if %s(%d) seq %d f 0x%x%s%s",
created ? "created" : "updated", n->zevpn->vni,
- ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf, sizeof(macbuf)),
+ &n->ip, &n->emac,
ifp ? ifp->name : "", ifindex, n->loc_seq, n->flags,
inform_bgp ? " inform_bgp" : "",
inform_dataplane ? " inform_dp" : "");
zebra_neigh_t *n = NULL;
struct listnode *node = NULL;
struct zebra_vrf *zvrf = NULL;
- char buf[ETHER_ADDR_STRLEN];
zvrf = vrf_info_lookup(zevpn->vxlan_if->vrf_id);
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("Processing neighbors on local MAC %s %s, VNI %u",
- prefix_mac2str(&zmac->macaddr, buf, sizeof(buf)),
- seq_change ? "CHANGE" : "ADD", zevpn->vni);
+ zlog_debug("Processing neighbors on local MAC %pEA %s, VNI %u",
+ &zmac->macaddr, seq_change ? "CHANGE" : "ADD",
+ zevpn->vni);
/* Walk all neighbors and mark any inactive local neighbors as
* active and/or update sequence number upon a move, and inform BGP.
{
zebra_neigh_t *n = NULL;
struct listnode *node = NULL;
- char buf[ETHER_ADDR_STRLEN];
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("Processing neighbors on local MAC %s DEL, VNI %u",
- prefix_mac2str(&zmac->macaddr, buf, sizeof(buf)),
- zevpn->vni);
+ zlog_debug("Processing neighbors on local MAC %pEA DEL, VNI %u",
+ &zmac->macaddr, zevpn->vni);
/* Walk all local neighbors and mark as inactive and inform
* BGP, if needed.
{
zebra_neigh_t *n = NULL;
struct listnode *node = NULL;
- char buf[ETHER_ADDR_STRLEN];
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("Processing neighbors on remote MAC %s ADD, VNI %u",
- prefix_mac2str(&zmac->macaddr, buf, sizeof(buf)),
- zevpn->vni);
+ zlog_debug("Processing neighbors on remote MAC %pEA ADD, VNI %u",
+ &zmac->macaddr, zevpn->vni);
/* Walk all local neighbors and mark as inactive and inform
* BGP, if needed.
bool old_bgp_ready, bool new_bgp_ready, bool inform_dataplane,
bool inform_bgp, const char *sfx)
{
- char macbuf[ETHER_ADDR_STRLEN];
- char ipbuf[INET6_ADDRSTRLEN];
-
if (!IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
return;
- zlog_debug("%s neigh vni %u ip %s mac %s f 0x%x%s%s%s%s%s%s %s", pfx,
- n->zevpn->vni, ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf, sizeof(macbuf)), n->flags,
+ zlog_debug("%s neigh vni %u ip %pIA mac %pEA f 0x%x%s%s%s%s%s%s %s", pfx,
+ n->zevpn->vni, &n->ip, &n->emac, n->flags,
is_router ? " router" : "",
local_inactive ? " local-inactive" : "",
old_bgp_ready ? " old_bgp_ready" : "",
struct zebra_vrf *zvrf = NULL;
zebra_neigh_t *nbr = NULL;
zebra_evpn_t *zevpn = NULL;
- char buf1[INET6_ADDRSTRLEN];
- char buf2[ETHER_ADDR_STRLEN];
nbr = THREAD_ARG(t);
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "%s: duplicate addr MAC %s IP %s flags 0x%x learn count %u vni %u auto recovery expired",
- __func__,
- prefix_mac2str(&nbr->emac, buf2, sizeof(buf2)),
- ipaddr2str(&nbr->ip, buf1, sizeof(buf1)), nbr->flags,
+ "%s: duplicate addr MAC %pEA IP %pIA flags 0x%x learn count %u vni %u auto recovery expired",
+ __func__, &nbr->emac, &nbr->ip, nbr->flags,
nbr->dad_count, zevpn->vni);
UNSET_FLAG(nbr->flags, ZEBRA_NEIGH_DUPLICATE);
{
struct timeval elapsed = {0, 0};
- char buf[ETHER_ADDR_STRLEN];
- char buf1[INET6_ADDRSTRLEN];
bool reset_params = false;
if (!zebra_evpn_do_dup_addr_detect(zvrf))
if (CHECK_FLAG(nbr->flags, ZEBRA_NEIGH_DUPLICATE)) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "%s: duplicate addr MAC %s IP %s flags 0x%x skip installing, learn count %u recover time %u",
- __func__,
- prefix_mac2str(&nbr->emac, buf, sizeof(buf)),
- ipaddr2str(&nbr->ip, buf1, sizeof(buf1)),
+ "%s: duplicate addr MAC %pEA IP %pIA flags 0x%x skip installing, learn count %u recover time %u",
+ __func__, &nbr->emac, &nbr->ip,
nbr->flags, nbr->dad_count,
zvrf->dad_freeze_time);
if (reset_params) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "%s: duplicate addr MAC %s IP %s flags 0x%x detection time passed, reset learn count %u",
- __func__,
- prefix_mac2str(&nbr->emac, buf, sizeof(buf)),
- ipaddr2str(&nbr->ip, buf1, sizeof(buf1)),
+ "%s: duplicate addr MAC %pEA IP %pIA flags 0x%x detection time passed, reset learn count %u",
+ __func__, &nbr->emac, &nbr->ip,
nbr->flags, nbr->dad_count);
/* Reset learn count but do not start detection
* during REMOTE learn event.
if (nbr->dad_count >= zvrf->dad_max_moves) {
flog_warn(
EC_ZEBRA_DUP_IP_DETECTED,
- "VNI %u: MAC %s IP %s detected as duplicate during %s VTEP %pI4",
- nbr->zevpn->vni,
- prefix_mac2str(&nbr->emac, buf, sizeof(buf)),
- ipaddr2str(&nbr->ip, buf1, sizeof(buf1)),
+ "VNI %u: MAC %pEA IP %pIA detected as duplicate during %s VTEP %pI4",
+ nbr->zevpn->vni, &nbr->emac, &nbr->ip,
is_local ? "local update, last" : "remote update, from",
&vtep_ip);
if (zvrf->dad_freeze && zvrf->dad_freeze_time) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "%s: duplicate addr MAC %s IP %s flags 0x%x auto recovery time %u start",
- __func__,
- prefix_mac2str(&nbr->emac, buf,
- sizeof(buf)),
- ipaddr2str(&nbr->ip, buf1,
- sizeof(buf1)),
+ "%s: duplicate addr MAC %pEA IP %pIA flags 0x%x auto recovery time %u start",
+ __func__, &nbr->emac, &nbr->ip,
nbr->flags, zvrf->dad_freeze_time);
thread_add_timer(zrouter.master,
bool is_router, bool local_inactive,
bool dp_static)
{
- char buf[ETHER_ADDR_STRLEN];
- char buf2[INET6_ADDRSTRLEN];
struct zebra_vrf *zvrf;
zebra_neigh_t *n = NULL;
zebra_mac_t *zmac = NULL, *old_zmac = NULL;
if (!zmac) {
/* create a dummy MAC if the MAC is not already present */
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("AUTO MAC %s created for neigh %s on VNI %u",
- prefix_mac2str(macaddr, buf, sizeof(buf)),
- ipaddr2str(ip, buf2, sizeof(buf2)),
- zevpn->vni);
+ zlog_debug("AUTO MAC %pEA created for neigh %pIA on VNI %u",
+ macaddr, ip, zevpn->vni);
zmac = zebra_evpn_mac_add(zevpn, macaddr);
if (!zmac) {
- zlog_debug("Failed to add MAC %s VNI %u",
- prefix_mac2str(macaddr, buf, sizeof(buf)),
+ zlog_debug("Failed to add MAC %pEA VNI %u", macaddr,
zevpn->vni);
return -1;
}
if (!n) {
flog_err(
EC_ZEBRA_MAC_ADD_FAILED,
- "Failed to add neighbor %s MAC %s intf %s(%u) -> VNI %u",
- ipaddr2str(ip, buf2, sizeof(buf2)),
- prefix_mac2str(macaddr, buf, sizeof(buf)),
- ifp->name, ifp->ifindex, zevpn->vni);
+ "Failed to add neighbor %pIA MAC %pEA intf %s(%u) -> VNI %u",
+ ip, macaddr, ifp->name, ifp->ifindex,
+ zevpn->vni);
return -1;
}
/* Set "local" forwarding info. */
if (zebra_evpn_ip_inherit_dad_from_mac(zvrf, old_zmac, zmac, n)) {
flog_warn(
EC_ZEBRA_DUP_IP_INHERIT_DETECTED,
- "VNI %u: MAC %s IP %s detected as duplicate during local update, inherit duplicate from MAC",
- zevpn->vni, prefix_mac2str(macaddr, buf, sizeof(buf)),
- ipaddr2str(&n->ip, buf2, sizeof(buf2)));
+ "VNI %u: MAC %pEA IP %pIA detected as duplicate during local update, inherit duplicate from MAC",
+ zevpn->vni, macaddr, &n->ip);
}
/* For IP Duplicate Address Detection (DAD) is trigger,
if (upd_mac_seq && zmac->loc_seq != mac_new_seq) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "Seq changed for MAC %s VNI %u - old %u new %u",
- prefix_mac2str(macaddr, buf, sizeof(buf)),
- zevpn->vni, zmac->loc_seq, mac_new_seq);
+ "Seq changed for MAC %pEA VNI %u - old %u new %u",
+ macaddr, zevpn->vni,
+ zmac->loc_seq, mac_new_seq);
zmac->loc_seq = mac_new_seq;
if (zebra_evpn_mac_send_add_to_client(zevpn->vni, macaddr,
zmac->flags,
struct ipaddr *ip, struct ethaddr *macaddr,
uint16_t state)
{
- char buf[ETHER_ADDR_STRLEN];
- char buf2[INET6_ADDRSTRLEN];
zebra_neigh_t *n = NULL;
zebra_mac_t *zmac = NULL;
zmac = zebra_evpn_mac_lookup(zevpn, macaddr);
if (!zmac || !CHECK_FLAG(zmac->flags, ZEBRA_MAC_REMOTE)) {
zlog_debug(
- "Ignore remote neigh %s (MAC %s) on L2-VNI %u - MAC unknown or local",
- ipaddr2str(&n->ip, buf2, sizeof(buf2)),
- prefix_mac2str(macaddr, buf, sizeof(buf)),
- zevpn->vni);
+ "Ignore remote neigh %pIA (MAC %pEA) on L2-VNI %u - MAC unknown or local",
+ &n->ip, macaddr, zevpn->vni);
return -1;
}
{
zebra_neigh_t *n;
int update_neigh = 0;
- char buf[ETHER_ADDR_STRLEN];
- char buf1[INET6_ADDRSTRLEN];
zebra_mac_t *old_mac = NULL;
bool old_static = false;
bool do_dad = false;
mac, 0);
if (!n) {
zlog_warn(
- "Failed to add Neigh %s MAC %s VNI %u Remote VTEP %pI4",
- ipaddr2str(ipaddr, buf1, sizeof(buf1)),
- prefix_mac2str(&mac->macaddr, buf,
- sizeof(buf)),
- zevpn->vni, &vtep_ip);
+ "Failed to add Neigh %pIA MAC %pEA VNI %u Remote VTEP %pI4",
+ ipaddr, &mac->macaddr, zevpn->vni,
+ &vtep_ip);
return;
}
old_static = zebra_evpn_neigh_is_static(n);
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
zlog_debug(
- "sync->remote neigh vni %u ip %s mac %s seq %d f0x%x",
- n->zevpn->vni,
- ipaddr2str(&n->ip, buf1,
- sizeof(buf1)),
- prefix_mac2str(&n->emac, buf,
- sizeof(buf)),
+ "sync->remote neigh vni %u ip %pIA mac %pEA seq %d f0x%x",
+ n->zevpn->vni, &n->ip, &n->emac,
seq, n->flags);
zebra_evpn_neigh_clear_sync_info(n);
if (IS_ZEBRA_NEIGH_ACTIVE(n))
if (zebra_evpn_ip_inherit_dad_from_mac(zvrf, old_mac, mac, n)) {
flog_warn(
EC_ZEBRA_DUP_IP_INHERIT_DETECTED,
- "VNI %u: MAC %s IP %s detected as duplicate during remote update, inherit duplicate from MAC",
- zevpn->vni,
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
- ipaddr2str(&n->ip, buf1, sizeof(buf1)));
+ "VNI %u: MAC %pEA IP %pIA detected as duplicate during remote update, inherit duplicate from MAC",
+ zevpn->vni, &mac->macaddr, &n->ip);
}
/* Check duplicate address detection for IP */
struct ipaddr *ip, zebra_mac_t *mac)
{
zebra_neigh_t *n;
- char buf[ETHER_ADDR_STRLEN];
- char buf2[INET6_ADDRSTRLEN];
assert(mac);
if (!n) {
flog_err(
EC_ZEBRA_MAC_ADD_FAILED,
- "Failed to add neighbor %s MAC %s intf %s(%u) -> VNI %u",
- ipaddr2str(ip, buf2, sizeof(buf2)),
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ "Failed to add neighbor %pIA MAC %pEA intf %s(%u) -> VNI %u",
+ ip, &mac->macaddr,
ifp->name, ifp->ifindex, zevpn->vni);
return -1;
}
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "SVI %s(%u) L2-VNI %u, sending GW MAC %s IP %s add to BGP with flags 0x%x",
+ "SVI %s(%u) L2-VNI %u, sending GW MAC %pEA IP %pIA add to BGP with flags 0x%x",
ifp->name, ifp->ifindex, zevpn->vni,
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
- ipaddr2str(ip, buf2, sizeof(buf2)), n->flags);
+ &mac->macaddr, ip, n->flags);
zebra_evpn_neigh_send_add_to_client(
zevpn->vni, ip, &n->emac, n->mac, n->flags, n->loc_seq);
SET_FLAG(n->flags, ZEBRA_NEIGH_SVI_IP);
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "SVI %s(%u) L2-VNI %u, sending SVI MAC %s IP %s add to BGP with flags 0x%x",
+ "SVI %s(%u) L2-VNI %u, sending SVI MAC %pEA IP %pIA add to BGP with flags 0x%x",
ifp->name, ifp->ifindex, zevpn->vni,
- prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
- ipaddr2str(ip, buf2, sizeof(buf2)), n->flags);
+ &mac->macaddr, ip, n->flags);
zebra_evpn_neigh_send_add_to_client(
zevpn->vni, ip, &n->emac, n->mac, n->flags, n->loc_seq);
struct zebra_vrf *zvrf, zebra_neigh_t *n,
zebra_mac_t *mac, struct ipaddr *ipaddr)
{
- char buf1[INET6_ADDRSTRLEN];
-
if (zvrf->dad_freeze && CHECK_FLAG(n->flags, ZEBRA_NEIGH_DUPLICATE)
&& CHECK_FLAG(n->flags, ZEBRA_NEIGH_REMOTE)
&& (memcmp(n->emac.octet, mac->macaddr.octet, ETH_ALEN) == 0)) {
vlan_if = zevpn_map_to_svi(zevpn);
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "%s: IP %s (flags 0x%x intf %s) is remote and duplicate, read kernel for local entry",
- __func__,
- ipaddr2str(ipaddr, buf1, sizeof(buf1)),
- n->flags, vlan_if ? vlan_if->name : "Unknown");
+ "%s: IP %pIA (flags 0x%x intf %s) is remote and duplicate, read kernel for local entry",
+ __func__, ipaddr, n->flags,
+ vlan_if ? vlan_if->name : "Unknown");
if (vlan_if)
neigh_read_specific_ip(ipaddr, vlan_if);
}
zebra_mac_t *zmac;
bool old_bgp_ready;
bool new_bgp_ready;
- char buf[INET6_ADDRSTRLEN];
- char buf2[ETHER_ADDR_STRLEN];
struct zebra_vrf *zvrf;
/* If entry doesn't exist, nothing to do. */
if (!zmac) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "Trying to del a neigh %s without a mac %s on VNI %u",
- ipaddr2str(ip, buf, sizeof(buf)),
- prefix_mac2str(&n->emac, buf2, sizeof(buf2)),
+ "Trying to del a neigh %pIA without a mac %pEA on VNI %u",
+ ip, &n->emac,
zevpn->vni);
return 0;
old_bgp_ready = zebra_evpn_neigh_is_ready_for_bgp(n);
if (zebra_evpn_neigh_is_static(n)) {
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
- zlog_debug("re-add sync neigh vni %u ip %s mac %s 0x%x",
- n->zevpn->vni,
- ipaddr2str(&n->ip, buf, sizeof(buf)),
- prefix_mac2str(&n->emac, buf2, sizeof(buf2)),
+ zlog_debug("re-add sync neigh vni %u ip %pIA mac %pEA 0x%x",
+ n->zevpn->vni, &n->ip, &n->emac,
n->flags);
if (!CHECK_FLAG(n->flags, ZEBRA_NEIGH_LOCAL_INACTIVE))
static inline void zebra_evpn_neigh_stop_hold_timer(zebra_neigh_t *n)
{
- char macbuf[ETHER_ADDR_STRLEN];
- char ipbuf[INET6_ADDRSTRLEN];
-
if (!n->hold_timer)
return;
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
- zlog_debug("sync-neigh vni %u ip %s mac %s 0x%x hold stop",
- n->zevpn->vni,
- ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf, sizeof(macbuf)),
- n->flags);
+ zlog_debug("sync-neigh vni %u ip %pIA mac %pEA 0x%x hold stop",
+ n->zevpn->vni, &n->ip, &n->emac, n->flags);
THREAD_OFF(n->hold_timer);
}
static inline bool zebra_evpn_neigh_clear_sync_info(zebra_neigh_t *n)
{
- char macbuf[ETHER_ADDR_STRLEN];
- char ipbuf[INET6_ADDRSTRLEN];
bool old_n_static = false;
bool new_n_static = false;
if (n->flags & ZEBRA_NEIGH_ALL_PEER_FLAGS) {
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
- zlog_debug("sync-neigh vni %u ip %s mac %s 0x%x clear",
- n->zevpn->vni,
- ipaddr2str(&n->ip, ipbuf, sizeof(ipbuf)),
- prefix_mac2str(&n->emac, macbuf,
- sizeof(macbuf)),
- n->flags);
+ zlog_debug("sync-neigh vni %u ip %pIA mac %pEA 0x%x clear",
+ n->zevpn->vni, &n->ip, &n->emac, n->flags);
old_n_static = zebra_evpn_neigh_is_static(n);
UNSET_FLAG(n->flags, ZEBRA_NEIGH_ALL_PEER_FLAGS);
*/
static int zl3vni_rmac_uninstall(zebra_l3vni_t *zl3vni, zebra_mac_t *zrmac)
{
- char buf[ETHER_ADDR_STRLEN];
const struct zebra_if *zif = NULL, *br_zif;
const struct zebra_l2info_vxlan *vxl = NULL;
const struct interface *br_ifp;
if (!zl3vni->vxlan_if) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "RMAC %s on L3-VNI %u hash %p couldn't be uninstalled - no vxlan_if",
- prefix_mac2str(&zrmac->macaddr,
- buf, sizeof(buf)),
- zl3vni->vni, zl3vni);
+ "RMAC %pEA on L3-VNI %u hash %p couldn't be uninstalled - no vxlan_if",
+ &zrmac->macaddr, zl3vni->vni, zl3vni);
return -1;
}
const struct ipaddr *vtep_ip,
const struct prefix *host_prefix)
{
- char buf[ETHER_ADDR_STRLEN];
- char buf1[INET6_ADDRSTRLEN];
zebra_mac_t *zrmac = NULL;
zrmac = zl3vni_rmac_lookup(zl3vni, rmac);
zrmac = zl3vni_rmac_add(zl3vni, rmac);
if (!zrmac) {
zlog_debug(
- "Failed to add RMAC %s L3VNI %u Remote VTEP %s, prefix %pFX",
- prefix_mac2str(rmac, buf, sizeof(buf)),
- zl3vni->vni,
- ipaddr2str(vtep_ip, buf1, sizeof(buf1)),
- host_prefix);
+ "Failed to add RMAC %pEA L3VNI %u Remote VTEP %pIA, prefix %pFX",
+ rmac, zl3vni->vni, vtep_ip, host_prefix);
return -1;
}
memset(&zrmac->fwd_info, 0, sizeof(zrmac->fwd_info));
&vtep_ip->ipaddr_v4)) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "L3VNI %u Remote VTEP change(%pI4 -> %s) for RMAC %s, prefix %pFX",
- zl3vni->vni,
- &zrmac->fwd_info.r_vtep_ip,
- ipaddr2str(vtep_ip, buf1, sizeof(buf1)),
- prefix_mac2str(rmac, buf, sizeof(buf)),
- host_prefix);
+ "L3VNI %u Remote VTEP change(%pI4 -> %pIA) for RMAC %pEA, prefix %pFX",
+ zl3vni->vni, &zrmac->fwd_info.r_vtep_ip,
+ vtep_ip, rmac, host_prefix);
zrmac->fwd_info.r_vtep_ip = vtep_ip->ipaddr_v4;
const struct ethaddr *rmac,
const struct prefix *host_prefix)
{
- char buf[ETHER_ADDR_STRLEN];
- char buf1[ETHER_ADDR_STRLEN];
- char buf2[INET6_ADDRSTRLEN];
zebra_neigh_t *nh = NULL;
/* Create the next hop entry, or update its mac, if necessary. */
nh = zl3vni_nh_add(zl3vni, vtep_ip, rmac);
if (!nh) {
zlog_debug(
- "Failed to add NH %s as Neigh (RMAC %s L3-VNI %u prefix %pFX)",
- ipaddr2str(vtep_ip, buf1, sizeof(buf2)),
- prefix_mac2str(rmac, buf, sizeof(buf)),
- zl3vni->vni, host_prefix);
+ "Failed to add NH %pIA as Neigh (RMAC %pEA L3-VNI %u prefix %pFX)",
+ vtep_ip, rmac, zl3vni->vni, host_prefix);
return -1;
}
} else if (memcmp(&nh->emac, rmac, ETH_ALEN) != 0) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "L3VNI %u RMAC change(%s --> %s) for nexthop %s, prefix %pFX",
- zl3vni->vni,
- prefix_mac2str(&nh->emac, buf, sizeof(buf)),
- prefix_mac2str(rmac, buf1, sizeof(buf1)),
- ipaddr2str(vtep_ip, buf2, sizeof(buf2)),
+ "L3VNI %u RMAC change(%pEA --> %pEA) for nexthop %pIA, prefix %pFX",
+ zl3vni->vni, &nh->emac, rmac, vtep_ip,
host_prefix);
memcpy(&nh->emac, rmac, ETH_ALEN);
struct zserv *client = NULL;
struct ethaddr svi_rmac, vrr_rmac = {.octet = {0} };
struct zebra_vrf *zvrf;
- char buf[ETHER_ADDR_STRLEN];
- char buf1[ETHER_ADDR_STRLEN];
bool is_anycast_mac = true;
client = zserv_find_client(ZEBRA_ROUTE_BGP, 0);
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "Send L3_VNI_ADD %u VRF %s RMAC %s VRR %s local-ip %pI4 filter %s to %s",
+ "Send L3_VNI_ADD %u VRF %s RMAC %pEA VRR %pEA local-ip %pI4 filter %s to %s",
zl3vni->vni, vrf_id_to_name(zl3vni_vrf_id(zl3vni)),
- prefix_mac2str(&svi_rmac, buf, sizeof(buf)),
- prefix_mac2str(&vrr_rmac, buf1, sizeof(buf1)),
- &zl3vni->local_vtep_ip,
+ &svi_rmac, &vrr_rmac, &zl3vni->local_vtep_ip,
CHECK_FLAG(zl3vni->filter, PREFIX_ROUTES_ONLY)
? "prefix-routes-only"
: "none",
static int zebra_vxlan_readd_remote_rmac(zebra_l3vni_t *zl3vni,
struct ethaddr *rmac)
{
- char buf[ETHER_ADDR_STRLEN];
zebra_mac_t *zrmac = NULL;
zrmac = zl3vni_rmac_lookup(zl3vni, rmac);
return 0;
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("Del remote RMAC %s L3VNI %u - readd",
- prefix_mac2str(rmac, buf, sizeof(buf)), zl3vni->vni);
+ zlog_debug("Del remote RMAC %pEA L3VNI %u - readd",
+ rmac, zl3vni->vni);
zl3vni_rmac_install(zl3vni, zrmac);
return 0;
struct interface *link_if,
struct ipaddr *ip)
{
- char buf[INET6_ADDRSTRLEN];
zebra_evpn_t *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
if (!zevpn) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "%s: Del neighbor %s EVPN is not present for interface %s",
- __func__, ipaddr2str(ip, buf, sizeof(buf)),
- ifp->name);
+ "%s: Del neighbor %pIA EVPN is not present for interface %s",
+ __func__, ip, ifp->name);
return 0;
}
}
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("Del neighbor %s intf %s(%u) -> L2-VNI %u",
- ipaddr2str(ip, buf, sizeof(buf)), ifp->name,
- ifp->ifindex, zevpn->vni);
+ zlog_debug("Del neighbor %pIA intf %s(%u) -> L2-VNI %u",
+ ip, ifp->name, ifp->ifindex, zevpn->vni);
return zebra_evpn_neigh_del_ip(zevpn, ip);
}
bool is_router,
bool local_inactive, bool dp_static)
{
- char buf[ETHER_ADDR_STRLEN];
- char buf2[INET6_ADDRSTRLEN];
zebra_evpn_t *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
if (IS_ZEBRA_DEBUG_VXLAN || IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
zlog_debug(
- "Add/Update neighbor %s MAC %s intf %s(%u) state 0x%x %s%s%s%s-> L2-VNI %u",
- ipaddr2str(ip, buf2, sizeof(buf2)),
- prefix_mac2str(macaddr, buf, sizeof(buf)), ifp->name,
+ "Add/Update neighbor %pIA MAC %pEA intf %s(%u) state 0x%x %s%s%s%s-> L2-VNI %u",
+ ip, macaddr, ifp->name,
ifp->ifindex, state, is_ext ? "ext-learned " : "",
is_router ? "router " : "",
local_inactive ? "local_inactive " : "",
struct ipaddr ip;
struct in_addr vtep_ip;
uint16_t l = 0, ipa_len;
- char buf[ETHER_ADDR_STRLEN];
char buf1[INET6_ADDRSTRLEN];
memset(&macaddr, 0, sizeof(struct ethaddr));
l += res_length;
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "Recv MACIP DEL VNI %u MAC %s%s%s Remote VTEP %pI4 from %s",
- vni,
- prefix_mac2str(&macaddr, buf, sizeof(buf)),
+ "Recv MACIP DEL VNI %u MAC %pEA%s%s Remote VTEP %pI4 from %s",
+ vni, &macaddr,
ipa_len ? " IP " : "",
ipa_len ?
ipaddr2str(&ip, buf1, sizeof(buf1)) : "",
uint16_t l = 0, ipa_len;
uint8_t flags = 0;
uint32_t seq;
- char buf[ETHER_ADDR_STRLEN];
char buf1[INET6_ADDRSTRLEN];
esi_t esi;
char esi_buf[ESI_STR_LEN];
else
strlcpy(esi_buf, "-", ESI_STR_LEN);
zlog_debug(
- "Recv %sMACIP ADD VNI %u MAC %s%s%s flags 0x%x seq %u VTEP %pI4 ESI %s from %s",
+ "Recv %sMACIP ADD VNI %u MAC %pEA%s%s flags 0x%x seq %u VTEP %pI4 ESI %s from %s",
(flags & ZEBRA_MACIP_TYPE_SYNC_PATH) ?
"sync-" : "",
- vni,
- prefix_mac2str(&macaddr, buf, sizeof(buf)),
+ vni, &macaddr,
ipa_len ? " IP " : "",
ipa_len ?
ipaddr2str(&ip, buf1, sizeof(buf1)) : "",
vni_t vni;
zebra_evpn_t *zevpn;
zebra_mac_t *mac;
- char buf[ETHER_ADDR_STRLEN];
zif = ifp->info;
assert(zif);
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "Add/update remote MAC %s intf %s(%u) VNI %u flags 0x%x - del local",
- prefix_mac2str(macaddr, buf, sizeof(buf)), ifp->name,
- ifp->ifindex, vni, mac->flags);
+ "Add/update remote MAC %pEA intf %s(%u) VNI %u flags 0x%x - del local",
+ macaddr, ifp->name, ifp->ifindex, vni, mac->flags);
/* Remove MAC from BGP. */
zebra_evpn_mac_send_del_to_client(zevpn->vni, macaddr, mac->flags,
{
zebra_evpn_t *zevpn;
struct zebra_vrf *zvrf;
- char buf[ETHER_ADDR_STRLEN];
assert(ifp);
if (!zevpn) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- " Add/Update %sMAC %s intf %s(%u) VID %u, could not find EVPN",
- sticky ? "sticky " : "",
- prefix_mac2str(macaddr, buf, sizeof(buf)),
+ " Add/Update %sMAC %pEA intf %s(%u) VID %u, could not find EVPN",
+ sticky ? "sticky " : "", macaddr,
ifp->name, ifp->ifindex, vid);
return 0;
}