]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Notice to end operator when a failure happens
authorDonald Sharp <sharpd@nvidia.com>
Thu, 30 Jun 2022 14:04:26 +0000 (10:04 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 1 Jul 2022 11:59:53 +0000 (07:59 -0400)
When reading a multipath route and we detect an encoding
error from the kernel( yeah I don't think so either ),
let's tell the operator what happened to that route.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/rt_netlink.c

index 21c991c7db2cfa307abd6824fb8978a0b80a0711..7572fb63f6075705857a2b8cba37ad1f68108cdf 100644 (file)
@@ -977,8 +977,19 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id,
                        if (nhe_id || ng)
                                rib_add_multipath(afi, SAFI_UNICAST, &p,
                                                  &src_p, re, ng, startup);
-                       else
+                       else {
+                               /*
+                                * I really don't see how this is possible
+                                * but since we are testing for it let's
+                                * let the end user know why the route
+                                * that was just received was swallowed
+                                * up and forgotten
+                                */
+                               zlog_err(
+                                       "%s: %pFX multipath RTM_NEWROUTE has a invalid nexthop group from the kernel",
+                                       __func__, &p);
                                XFREE(MTYPE_RE, re);
+                       }
                }
        } else {
                if (nhe_id) {