zebra: Add a breadcrumb for when we ignore a route

When we receive a route that we think we own and we
are not in startup conditions, then add a small debug
to help debug the issue when this happens, instead
of silently just ignoring the route.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2018-05-25 14:45:16 -04:00 committed by Philippe Guibert
parent d4d71f1133
commit 6ab5222f78

View File

@ -310,8 +310,12 @@ static int netlink_route_change_read_unicast(struct sockaddr_nl *snl,
return 0;
if (!startup && is_selfroute(rtm->rtm_protocol)
&& h->nlmsg_type == RTM_NEWROUTE)
&& h->nlmsg_type == RTM_NEWROUTE) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug("Route type: %d Received that we think we have originated, ignoring",
rtm->rtm_protocol);
return 0;
}
/* We don't care about change notifications for the MPLS table. */
/* TODO: Revisit this. */