]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: fix loading kernel routs without netlink
authorKristof Provost <kprovost@netgate.com>
Thu, 15 Aug 2024 16:34:35 +0000 (18:34 +0200)
committerKristof Provost <kp@FreeBSD.org>
Fri, 16 Aug 2024 08:42:33 +0000 (10:42 +0200)
Commit 605df8d44 zebra: Use zebra dplane for RTM link and addr broke loading of
kernel routes at startup for configurations without netlink.

It rearranged the startup sequence in zebra_ns_enable() to pass via
zebra_ns_startup_continue(), triggered through zebra_dplane_startup_stage()
calls. However, it neglected to make these calls in the non-netlink code path.
As a result zebra failed to load kernel routes at startup on platforms such
as FreeBSD.

Insert these calls so we run through all of the expected startup stages.

Signed-off-by: Kristof Provost <kprovost@netgate.com>
zebra/if_ioctl.c
zebra/if_sysctl.c
zebra/kernel_socket.c

index d0aa2167fe5de3cc70e71e3e92b855db7a6bf114..688a7f6e332f9874d7d69b558ef079a1fc236888 100644 (file)
@@ -296,6 +296,8 @@ void interface_list(struct zebra_ns *zns)
           /proc/net/if_inet6. */
        ifaddr_proc_ipv6();
 #endif /* HAVE_PROC_NET_IF_INET6 */
+
+       zebra_dplane_startup_stage(zns, ZEBRA_DPLANE_INTERFACES_READ);
 }
 
 #endif /* OPEN_BSD */
index 9db959896eddccac9c647bb5e7deb70c25ccc9d1..28cbb0415a5ca2141b360021262401bd729062d6 100644 (file)
@@ -128,6 +128,8 @@ void interface_list(struct zebra_ns *zns)
 
        /* Free sysctl buffer. */
        XFREE(MTYPE_TMP, ref);
+
+       zebra_dplane_startup_stage(zns, ZEBRA_DPLANE_INTERFACES_READ);
 }
 
 #endif /* !defined(GNU_LINUX) && !defined(OPEN_BSD) */
index d50e7de229a85b02f015473a10be7e1612e6023c..5cfbe7a896ddf907f8a7538f85ee1f6363d92872 100644 (file)
@@ -1468,10 +1468,12 @@ static void routing_socket(struct zebra_ns *zns)
 
 void interface_list_second(struct zebra_ns *zns)
 {
+       zebra_dplane_startup_stage(zns, ZEBRA_DPLANE_ADDRESSES_READ);
 }
 
 void interface_list_tunneldump(struct zebra_ns *zns)
 {
+       zebra_dplane_startup_stage(zns, ZEBRA_DPLANE_TUNNELS_READ);
 }
 
 /* Exported interface function.  This function simply calls