`%pRN` is not appropriate anymore.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
{
/* local path was not picked as the winner; kick it out */
if (bgp_debug_zebra(NULL))
- zlog_debug("evicting local evpn prefix %pRN as remote won",
+ zlog_debug("evicting local evpn prefix %pBD as remote won",
dest);
evpn_delete_old_local_route(bgp, vpn, dest, local_pi, NULL);
sizeof(attr_str));
zlog_debug(
- "%u: prefix %pRN with attr %s - DENIED due to martian or self nexthop",
+ "%u: prefix %pBD with attr %s - DENIED due to martian or self nexthop",
bgp->vrf_id, dest,
attr_str);
}
if (debug)
zlog_debug(
- "%s: entry: leak-to=%s, p=%pRN, type=%d, sub_type=%d",
+ "%s: entry: leak-to=%s, p=%pBD, type=%d, sub_type=%d",
__func__, bgp->name_pretty, bn, source_bpi->type,
source_bpi->sub_type);
bgp_attr_unintern(&new_attr);
if (debug)
zlog_debug(
- "%s: ->%s: %pRN: Found route, no change",
+ "%s: ->%s: %pBD: Found route, no change",
__func__, bgp->name_pretty, bn);
return NULL;
}
bgp_dest_unlock_node(bn);
if (debug)
- zlog_debug("%s: ->%s: %pRN Found route, changed attr",
+ zlog_debug("%s: ->%s: %pBD Found route, changed attr",
__func__, bgp->name_pretty, bn);
return bpi;
bgp_process(bgp, bn, afi, safi);
if (debug)
- zlog_debug("%s: ->%s: %pRN: Added new route", __func__,
+ zlog_debug("%s: ->%s: %pBD: Added new route", __func__,
bgp->name_pretty, bn);
return new;
if (debug) {
zlog_debug(
- "%s: entry: leak-from=%s, p=%pRN, type=%d, sub_type=%d",
+ "%s: entry: leak-from=%s, p=%pBD, type=%d, sub_type=%d",
__func__, bgp_vrf->name_pretty, path_vrf->net,
path_vrf->type, path_vrf->sub_type);
}
for (bn = bgp_table_top(table); bn; bn = bgp_route_next(bn)) {
bpi = bgp_dest_get_bgp_path_info(bn);
if (debug && bpi) {
- zlog_debug("%s: looking at prefix %pRN",
+ zlog_debug("%s: looking at prefix %pBD",
__func__, bn);
}
}
if (debug)
- zlog_debug("%s: pfx %pRN: num_labels %d", __func__,
+ zlog_debug("%s: pfx %pBD: num_labels %d", __func__,
path_vpn->net, num_labels);
/*
int debug = BGP_DEBUG(vpn, VPN_LEAK_TO_VRF);
if (debug)
- zlog_debug("%s: entry: p=%pRN, type=%d, sub_type=%d", __func__,
+ zlog_debug("%s: entry: p=%pBD, type=%d, sub_type=%d", __func__,
path_vpn->net, path_vpn->type, path_vpn->sub_type);
if (debug)
if (dest->pdest) {
prefix_rd2str((struct prefix_rd *)bgp_dest_get_prefix(dest->pdest),
buf1, sizeof(buf1));
- vty_out(vty, " %d/%d %pRN RD %s %s flags 0x%x\n",
+ vty_out(vty, " %d/%d %pBD RD %s %s flags 0x%x\n",
afi, safi, dest, buf1, bgp_path->name_pretty, path->flags);
} else
- vty_out(vty, " %d/%d %pRN %s flags 0x%x\n",
+ vty_out(vty, " %d/%d %pBD %s flags 0x%x\n",
afi, safi, dest, bgp_path->name_pretty, path->flags);
}
}
path->sub_type, path->attr, dest)) {
if (BGP_DEBUG(nht, NHT))
zlog_debug(
- "%s: prefix %pRN (vrf %s), ignoring path due to martian or self-next-hop",
+ "%s: prefix %pBD (vrf %s), ignoring path due to martian or self-next-hop",
__func__, dest, bgp_path->name);
} else
bnc_is_valid_nexthop =
prefix_rd2str((struct prefix_rd *)bgp_dest_get_prefix(dest->pdest),
buf1, sizeof(buf1));
zlog_debug(
- "... eval path %d/%d %pRN RD %s %s flags 0x%x",
+ "... eval path %d/%d %pBD RD %s %s flags 0x%x",
afi, safi, dest, buf1,
bgp_path->name_pretty, path->flags);
} else
zlog_debug(
- "... eval path %d/%d %pRN %s flags 0x%x",
+ "... eval path %d/%d %pBD %s flags 0x%x",
afi, safi, dest, bgp_path->name_pretty,
path->flags);
}
if (CHECK_FLAG(dest->flags, BGP_NODE_PROCESS_SCHEDULED)) {
if (BGP_DEBUG(update, UPDATE_OUT))
zlog_debug(
- "Route %pRN is in workqueue and being processed, not deferred.",
- bgp_dest_to_rnode(dest));
+ "Route %pBD is in workqueue and being processed, not deferred.",
+ dest);
return 0;
}
bgp->gr_info[afi][safi].route_list,
dest);
if (BGP_DEBUG(update, UPDATE_OUT))
- zlog_debug("DEFER route %pRN, dest %p, node %p",
+ zlog_debug("DEFER route %pBD, dest %p, node %p",
dest, dest, dest->rt_node);
return 0;
}
debug = bgp_debug_bestpath(dest);
if (debug)
zlog_debug(
- "%s: bgp delete in progress, ignoring event, p=%pRN",
+ "%s: bgp delete in progress, ignoring event, p=%pBD",
__func__, dest);
return;
}
debug = bgp_debug_bestpath(dest);
if (debug)
- zlog_debug("%s: p=%pRN afi=%s, safi=%s start", __func__, dest,
+ zlog_debug("%s: p=%pBD afi=%s, safi=%s start", __func__, dest,
afi2str(afi), safi2str(safi));
/* The best path calculation for the route is deferred if
if (debug)
zlog_debug(
- "%s: p=%pRN afi=%s, safi=%s, old_select=%p, new_select=%p",
+ "%s: p=%pBD afi=%s, safi=%s, old_select=%p, new_select=%p",
__func__, dest, afi2str(afi), safi2str(safi),
old_select, new_select);
dest = bgp_route_next(dest)) {
bdistance = bgp_dest_get_bgp_distance_info(dest);
if (bdistance != NULL)
- vty_out(vty, " distance %d %pRN %s\n",
+ vty_out(vty, " distance %d %pBD %s\n",
bdistance->distance, dest,
bdistance->access_list ? bdistance->access_list
: "");
#include "queue.h"
#include "filter.h"
#include "command.h"
+#include "printfrr.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"
bgp_dest_lock_node(matched);
return matched;
}
+
+printfrr_ext_autoreg_p("BD", printfrr_bd)
+static ssize_t printfrr_bd(char *buf, size_t bsz, const char *fmt,
+ int prec, const void *ptr)
+{
+ const struct bgp_dest *dest = ptr;
+ const struct prefix *p = bgp_dest_get_prefix(dest);
+
+ prefix2str(p, buf, bsz);
+ return 2;
+}
#ifdef _FRR_ATTRIBUTE_PRINTFRR
#pragma FRR printfrr_ext "%pRN" (struct bgp_node *)
+#pragma FRR printfrr_ext "%pBD" (struct bgp_dest *)
#endif
#endif /* _QUAGGA_BGP_TABLE_H */
if (!bgp_dest_has_bgp_path_info_data(dest))
continue;
- vnc_zlog_debug_verbose("%s: checking prefix %pRN",
+ vnc_zlog_debug_verbose("%s: checking prefix %pBD",
__func__, dest);
dest_p = bgp_dest_get_prefix(dest);