From b881a42484b4149289ef1542400f33aba5cef1b4 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 11 Jun 2015 09:11:12 -0700 Subject: [PATCH] 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. --- zebra/rt_netlink.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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; } -- 2.39.5