summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2016-09-08 18:38:53 +0200
committervivek <vivek@cumulusnetworks.com>2016-09-08 18:53:26 +0200
commit80c2442a9b959afce944d75c62565a9659bf84f9 (patch)
treed9acd69caa90f5391dff07a461844416f5f0889b /bgpd
parentbgpd: Enhance path selection logs (diff)
downloadfrr-80c2442a9b959afce944d75c62565a9659bf84f9.tar.xz
frr-80c2442a9b959afce944d75c62565a9659bf84f9.zip
lib, bgpd: Log next hops
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Ticket: CM-12390 Reviewed By: CCR-5156 Testing Done: Manual
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_nht.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index 23c64731a..caf6fc2b4 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -370,8 +370,8 @@ bgp_parse_nexthop_update (int command, vrf_id_t vrf_id)
{
char buf[PREFIX2STR_BUFFER];
prefix2str(&p, buf, sizeof (buf));
- zlog_debug("parse nexthop update(%s): metric=%d, #nexthop=%d", buf,
- metric, nexthop_num);
+ zlog_debug("%d: NH update for %s - metric %d (cur %d) #nhops %d (cur %d)",
+ vrf_id, buf, metric, bnc->metric, nexthop_num, bnc->nexthop_num);
}
if (metric != bnc->metric)
@@ -420,6 +420,13 @@ bgp_parse_nexthop_update (int command, vrf_id_t vrf_id)
break;
}
+ if (BGP_DEBUG(nht, NHT))
+ {
+ char buf[NEXTHOP_STRLEN];
+ zlog_debug(" nhop via %s",
+ nexthop2str (nexthop, buf, sizeof (buf)));
+ }
+
if (nhlist_tail)
{
nhlist_tail->next = nexthop;
@@ -642,6 +649,14 @@ evaluate_paths (struct bgp_nexthop_cache *bnc)
int afi;
struct peer *peer = (struct peer *)bnc->nht_info;
+ if (BGP_DEBUG(nht, NHT))
+ {
+ 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);
+ }
+
LIST_FOREACH(path, &(bnc->paths), nh_thread)
{
if (!(path->type == ZEBRA_ROUTE_BGP &&