From: Donald Sharp Date: Thu, 11 Jun 2015 16:11:12 +0000 (-0700) Subject: When an interface is disabled, a Cumulus kernel patch causes route deletes to X-Git-Tag: frr-2.0-rc1~1353 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=b881a42484b4149289ef1542400f33aba5cef1b4;p=matthieu%2Ffrr.git When an interface is disabled, a Cumulus kernel patch causes route deletes to 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. --- diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 0de024ce1d..f3bf1917b4 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -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; }