]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Add some missing breadcrumbs
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 18 Oct 2018 13:13:18 +0000 (09:13 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 18 Oct 2018 13:13:18 +0000 (09:13 -0400)
During a debugging session last night I discovered that I was
still having some `fun` figuring out why zebra was not making
a route's nexthop active.  After some debugging I figured out
that I was missing some states that we could end up in that
didn't have debug information about what happened in nexthop_active.

Add the missing breadcrumbs for nexthop resolution.  In addition
add a bit of code to notice the ebgp state without recursion turned
on and to let the user know about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zebra_rib.c

index 4c35b1003f8add81854f58d37c9e05426b46edaf..05419ee4bf16962a595430b7c173f8a4b62ddf5f 100644 (file)
@@ -601,9 +601,20 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
                                        __PRETTY_FUNCTION__);
                        return resolved;
                } else {
+                       if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
+                               zlog_debug("\t%s: Route Type %s has not turned on recursion",
+                                          __PRETTY_FUNCTION__,
+                                          zebra_route_string(re->type));
+                               if (re->type == ZEBRA_ROUTE_BGP &&
+                                   !CHECK_FLAG(re->flags, ZEBRA_FLAG_IBGP))
+                                       zlog_debug("\tEBGP: see \"disable-ebgp-connected-route-check\" or \"disable-connected-check\"");
+                       }
                        return 0;
                }
        }
+       if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+               zlog_debug("\t%s: Nexthop did not lookup in table",
+                          __PRETTY_FUNCTION__);
        return 0;
 }