]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Add a breadcrumb for when we ignore a route
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 25 May 2018 18:45:16 +0000 (14:45 -0400)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 30 May 2018 08:03:10 +0000 (10:03 +0200)
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>
zebra/rt_netlink.c

index 89f59c19338331c2d7f788e7d3b547e38a5fa8b7..999ad1bdecb7502ce80ac35fd1b382b88ba9864f 100644 (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. */