]> git.puffer.fish Git - matthieu/frr.git/commitdiff
sharpd: replace `receive_notify` with request
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 23 Nov 2023 13:53:37 +0000 (14:53 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 23 Nov 2023 13:57:58 +0000 (14:57 +0100)
Send `ZEBRA_ROUTE_NOTIFY_REQUEST` rather than relying on the options
field in zclient startup.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
sharpd/sharp_zebra.c

index 40921ecdd38a70282c8039b03195701ea8d5f2a1..aa720bacf2a66726a9859ece8e29571868cb83b9 100644 (file)
@@ -512,6 +512,7 @@ static int route_notify_owner(ZAPI_CALLBACK_ARGS)
 
 static void zebra_connected(struct zclient *zclient)
 {
+       zebra_route_notify_send(ZEBRA_ROUTE_NOTIFY_REQUEST, zclient, true);
        zclient_send_reg_requests(zclient, VRF_DEFAULT);
 
        /*
@@ -1067,14 +1068,12 @@ static zclient_handler *const sharp_handlers[] = {
 
 void sharp_zebra_init(void)
 {
-       struct zclient_options opt = {.receive_notify = true};
-
        hook_register_prio(if_real, 0, sharp_ifp_create);
        hook_register_prio(if_up, 0, sharp_ifp_up);
        hook_register_prio(if_down, 0, sharp_ifp_down);
        hook_register_prio(if_unreal, 0, sharp_ifp_destroy);
 
-       zclient = zclient_new(master, &opt, sharp_handlers,
+       zclient = zclient_new(master, &zclient_options_default, sharp_handlers,
                              array_size(sharp_handlers));
 
        zclient_init(zclient, ZEBRA_ROUTE_SHARP, 0, &sharp_privs);