]> git.proxmox.com Git - mirror_frr.git/blobdiff - babeld/babel_zebra.c
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
[mirror_frr.git] / babeld / babel_zebra.c
index 8dea1431e2eb0429007bd1ac35128ab8043d1033..86f8bc721e73886f9f7182760f6780459b2791fe 100644 (file)
@@ -39,7 +39,7 @@ void babelz_zebra_init(void);
 struct zclient *zclient;
 
 /* Debug types */
-static struct {
+static const struct {
     int type;
     int str_min_len;
     const char *str;
@@ -56,8 +56,7 @@ static struct {
 
 /* Zebra route add and delete treatment. */
 static int
-babel_zebra_read_route (int command, struct zclient *zclient,
-                       zebra_size_t length, vrf_id_t vrf)
+babel_zebra_read_route (ZAPI_CALLBACK_ARGS)
 {
     struct zapi_route api;
 
@@ -68,7 +67,7 @@ babel_zebra_read_route (int command, struct zclient *zclient,
     if (CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX))
         return 0;
 
-    if (command == ZEBRA_REDISTRIBUTE_ROUTE_ADD) {
+    if (cmd == ZEBRA_REDISTRIBUTE_ROUTE_ADD) {
         babel_route_add(&api);
     } else {
         babel_route_delete(&api);
@@ -237,14 +236,10 @@ babel_zebra_connected (struct zclient *zclient)
 
 void babelz_zebra_init(void)
 {
-    zclient = zclient_new_notify(master, &zclient_options_default);
+    zclient = zclient_new(master, &zclient_options_default);
     zclient_init(zclient, ZEBRA_ROUTE_BABEL, 0, &babeld_privs);
 
     zclient->zebra_connected = babel_zebra_connected;
-    zclient->interface_add = babel_interface_add;
-    zclient->interface_delete = babel_interface_delete;
-    zclient->interface_up = babel_interface_up;
-    zclient->interface_down = babel_interface_down;
     zclient->interface_address_add = babel_interface_address_add;
     zclient->interface_address_delete = babel_interface_address_delete;
     zclient->redistribute_route_add = babel_zebra_read_route;