]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pbrd: 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:36 +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>
pbrd/pbr_zebra.c

index 2e2302b29da5bd0fbc00e96dadb956beae974051..dd15beaff4402506b634653470f6d5b45224cf4c 100644 (file)
@@ -222,6 +222,8 @@ static int rule_notify_owner(ZAPI_CALLBACK_ARGS)
 static void zebra_connected(struct zclient *zclient)
 {
        DEBUGD(&pbr_dbg_zebra, "%s: Registering for fun and profit", __func__);
+
+       zebra_route_notify_send(ZEBRA_ROUTE_NOTIFY_REQUEST, zclient, true);
        zclient_send_reg_requests(zclient, VRF_DEFAULT);
 }
 
@@ -401,9 +403,7 @@ static zclient_handler *const pbr_handlers[] = {
 
 void pbr_zebra_init(void)
 {
-       struct zclient_options opt = { .receive_notify = true };
-
-       zclient = zclient_new(master, &opt, pbr_handlers,
+       zclient = zclient_new(master, &zclient_options_default, pbr_handlers,
                              array_size(pbr_handlers));
 
        zclient_init(zclient, ZEBRA_ROUTE_PBR, 0, &pbr_privs);