if (LIST_EMPTY(&(bnc->paths)) && !bnc->nht_info) {
if (BGP_DEBUG(nht, NHT)) {
char buf[PREFIX2STR_BUFFER];
- zlog_debug("bgp_unlink_nexthop: freeing bnc %s",
- bnc_str(bnc, buf, PREFIX2STR_BUFFER));
+ zlog_debug("bgp_unlink_nexthop: freeing bnc %s(%s)",
+ bnc_str(bnc, buf, PREFIX2STR_BUFFER),
+ bnc->bgp->name_pretty);
}
unregister_zebra_rnh(bnc,
CHECK_FLAG(bnc->flags, BGP_STATIC_ROUTE));
if (BGP_DEBUG(nht, NHT)) {
char buf[PREFIX2STR_BUFFER];
- zlog_debug("Allocated bnc %s peer %p",
- bnc_str(bnc, buf, PREFIX2STR_BUFFER), peer);
+ zlog_debug("Allocated bnc %s(%s) peer %p",
+ bnc_str(bnc, buf, PREFIX2STR_BUFFER),
+ bnc->bgp->name_pretty, peer);
}
}
peer->bgp->nexthop_cache_table[family2afi(p.family)], &p);
if (!rn) {
if (BGP_DEBUG(nht, NHT))
- zlog_debug("Cannot find connected NHT node for peer %s",
- peer->host);
+ zlog_debug(
+ "Cannot find connected NHT node for peer %s(%s)",
+ peer->host, peer->bgp->name_pretty);
return;
}
bnc = bgp_node_get_bgp_nexthop_info(rn);
if (!bnc) {
if (BGP_DEBUG(nht, NHT))
- zlog_debug("Cannot find connected NHT node for peer %s on route_node as expected",
- peer->host);
+ zlog_debug(
+ "Cannot find connected NHT node for peer %s(%s) on route_node as expected",
+ peer->host, peer->bgp->name_pretty);
bgp_unlock_node(rn);
return;
}
if (bnc->nht_info != peer) {
if (BGP_DEBUG(nht, NHT))
zlog_debug(
- "Connected NHT %p node for peer %s points to %p",
- bnc, peer->host, bnc->nht_info);
+ "Connected NHT %p node for peer %s(%s) points to %p",
+ bnc, peer->host, bnc->bgp->name_pretty,
+ bnc->nht_info);
return;
}
if (LIST_EMPTY(&(bnc->paths))) {
if (BGP_DEBUG(nht, NHT))
- zlog_debug("Freeing connected NHT node %p for peer %s",
- bnc, peer->host);
+ zlog_debug(
+ "Freeing connected NHT node %p for peer %s(%s)",
+ bnc, peer->host, bnc->bgp->name_pretty);
unregister_zebra_rnh(bnc, 0);
bgp_node_set_bgp_nexthop_info(bnc->node, NULL);
bgp_unlock_node(bnc->node);
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
if (BGP_DEBUG(nht, NHT))
- zlog_debug("%s: Failure to decode nexthop update",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s[%s]: Failure to decode nexthop update",
+ __PRETTY_FUNCTION__, bgp->name_pretty);
return;
}
if (BGP_DEBUG(nht, NHT)) {
char buf[PREFIX2STR_BUFFER];
prefix2str(&nhr.prefix, buf, sizeof(buf));
- zlog_debug("parse nexthop update(%s): rn not found",
- buf);
+ zlog_debug("parse nexthop update(%s(%s)): rn not found",
+ buf, bgp->name_pretty);
}
return;
}
char buf[PREFIX2STR_BUFFER];
prefix2str(&nhr.prefix, buf, sizeof(buf));
- zlog_debug("parse nexthop update(%s): bnc node info not found",
- buf);
+ zlog_debug(
+ "parse nexthop update(%s(%s)): bnc node info not found",
+ buf, bgp->name_pretty);
}
bgp_unlock_node(rn);
return;
char buf[PREFIX2STR_BUFFER];
prefix2str(&nhr.prefix, buf, sizeof(buf));
zlog_debug(
- "%u: Rcvd NH update %s - metric %d/%d #nhops %d/%d flags 0x%x",
- vrf_id, buf, nhr.metric, bnc->metric, nhr.nexthop_num,
- bnc->nexthop_num, bnc->flags);
+ "%s(%u): Rcvd NH update %s - metric %d/%d #nhops %d/%d flags 0x%x",
+ bnc->bgp->name_pretty, vrf_id, buf, nhr.metric,
+ bnc->metric, nhr.nexthop_num, bnc->nexthop_num,
+ bnc->flags);
}
if (nhr.metric != bnc->metric)
prefix2str(p, buf, PREFIX2STR_BUFFER);
zlog_debug("%s: sending cmd %s for %s (vrf %s)",
__func__, zserv_command_string(command), buf,
- bnc->bgp->name);
+ bnc->bgp->name_pretty);
}
ret = zclient_send_rnh(zclient, command, p, exact_match,
char buf[PREFIX2STR_BUFFER];
bnc_str(bnc, buf, PREFIX2STR_BUFFER);
zlog_debug(
- "NH update for %s - flags 0x%x chgflags 0x%x - evaluate paths",
- buf, bnc->flags, bnc->change_flags);
+ "NH update for %s(%s) - flags 0x%x chgflags 0x%x - evaluate paths",
+ buf, bnc->bgp->name_pretty, bnc->flags,
+ bnc->change_flags);
}
LIST_FOREACH (path, &(bnc->paths), nh_thread) {
if (peer && !CHECK_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED)) {
if (BGP_DEBUG(nht, NHT))
- zlog_debug("%s: Updating peer (%s) status with NHT",
- __FUNCTION__, peer->host);
+ zlog_debug("%s: Updating peer (%s(%s)) status with NHT",
+ __FUNCTION__, peer->host,
+ peer->bgp->name_pretty);
bgp_fsm_event_update(peer, bgp_isvalid_nexthop(bnc));
SET_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED);
}