]> git.puffer.fish Git - matthieu/frr.git/commitdiff
When an interface is disabled, a Cumulus kernel patch causes route deletes to
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 11 Jun 2015 16:11:12 +0000 (09:11 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 11 Jun 2015 16:11:12 +0000 (09:11 -0700)
be issued to Quagga. Quagga will in turn try to re-add the route(s) back to
the kernel and this will result in an error back from the kernel. This change
is to make sure these error messages are not logged by default. Subsequent
changes will cleanup this handling (to address CM-4577).

Note: This patch should not be upstreamed.

zebra/rt_netlink.c

index 0de024ce1d78e796e3bde9bda0fa40e9679c9688..f3bf1917b47013a8798aca53607e3184abfdf598 100644 (file)
@@ -375,10 +375,24 @@ netlink_parse_info (int (*filter) (struct sockaddr_nl *, struct nlmsghdr *),
                  return 0;
                }
 
-             zlog_err ("%s error: %s, type=%s(%u), seq=%u, pid=%u",
+             if (nl == &netlink_cmd
+                 && msg_type == RTM_NEWROUTE && -errnum == ESRCH)
+               {
+                  /* This is known to happen in some situations, don't log
+                   * as error.
+                   */
+                 if (IS_ZEBRA_DEBUG_KERNEL)
+                   zlog_debug ("%s error: %s, type=%s(%u), seq=%u, pid=%u",
+                                nl->name, safe_strerror (-errnum),
+                                lookup (nlmsg_str, msg_type),
+                                msg_type, err->msg.nlmsg_seq, err->msg.nlmsg_pid);
+                }
+              else
+               zlog_err ("%s error: %s, type=%s(%u), seq=%u, pid=%u",
                        nl->name, safe_strerror (-errnum),
                        lookup (nlmsg_str, msg_type),
                        msg_type, err->msg.nlmsg_seq, err->msg.nlmsg_pid);
+
               return -1;
             }