]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Don't error on nexthop object support check
authorStephen Worley <sworley@cumulusnetworks.com>
Tue, 14 May 2019 22:47:20 +0000 (15:47 -0700)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:13:40 +0000 (11:13 -0400)
On startup when we are requesting all nexthop objects
from the kernel and it doesn't support that, we should not
produce an error message.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
zebra/kernel_netlink.c

index a81788028e058522c23b870d1aa30bdca64687a7..23f1a3bf86ca61a5cbca8a26735dade8f6f7a1ff 100644 (file)
@@ -891,15 +891,20 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
                                                        msg_type,
                                                        err->msg.nlmsg_seq,
                                                        err->msg.nlmsg_pid);
-                               } else
-                                       flog_err(
-                                               EC_ZEBRA_UNEXPECTED_MESSAGE,
-                                               "%s error: %s, type=%s(%u), seq=%u, pid=%u",
-                                               nl->name,
-                                               safe_strerror(-errnum),
-                                               nl_msg_type_to_str(msg_type),
-                                               msg_type, err->msg.nlmsg_seq,
-                                               err->msg.nlmsg_pid);
+                               } else {
+                                       if ((msg_type != RTM_GETNEXTHOP)
+                                           || !startup)
+                                               flog_err(
+                                                       EC_ZEBRA_UNEXPECTED_MESSAGE,
+                                                       "%s error: %s, type=%s(%u), seq=%u, pid=%u",
+                                                       nl->name,
+                                                       safe_strerror(-errnum),
+                                                       nl_msg_type_to_str(
+                                                               msg_type),
+                                                       msg_type,
+                                                       err->msg.nlmsg_seq,
+                                                       err->msg.nlmsg_pid);
+                               }
 
                                return -1;
                        }