summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ripngd/ripng_zebra.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index bb5a880c02..87e275ad0d 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -19,7 +19,7 @@
#include "ripngd/ripng_debug.h"
/* All information about zebra. */
-struct zclient *zclient = NULL;
+struct zclient *ripng_zclient = NULL;
/* Send ECMP routes to zebra. */
static void ripng_zebra_ipv6_send(struct ripng *ripng, struct agg_node *rp,
@@ -67,7 +67,7 @@ static void ripng_zebra_ipv6_send(struct ripng *ripng, struct agg_node *rp,
api.tag = rinfo->tag;
}
- zclient_route_send(cmd, zclient, &api);
+ zclient_route_send(cmd, ripng_zclient, &api);
if (IS_RIPNG_DEBUG_ZEBRA) {
if (ripng->ecmp)
@@ -137,14 +137,14 @@ static int ripng_zebra_read_route(ZAPI_CALLBACK_ARGS)
void ripng_redistribute_conf_update(struct ripng *ripng, int type)
{
- zebra_redistribute_send(ZEBRA_REDISTRIBUTE_ADD, zclient, AFI_IP6,
+ zebra_redistribute_send(ZEBRA_REDISTRIBUTE_ADD, ripng_zclient, AFI_IP6,
type, 0, ripng->vrf->vrf_id);
}
void ripng_redistribute_conf_delete(struct ripng *ripng, int type)
{
- if (zclient->sock > 0)
- zebra_redistribute_send(ZEBRA_REDISTRIBUTE_DELETE, zclient,
+ if (ripng_zclient->sock > 0)
+ zebra_redistribute_send(ZEBRA_REDISTRIBUTE_DELETE, ripng_zclient,
AFI_IP6, type, 0, ripng->vrf->vrf_id);
ripng_redistribute_withdraw(ripng, type);
@@ -161,7 +161,7 @@ void ripng_redistribute_enable(struct ripng *ripng)
if (!ripng_redistribute_check(ripng, i))
continue;
- zebra_redistribute_send(ZEBRA_REDISTRIBUTE_ADD, zclient,
+ zebra_redistribute_send(ZEBRA_REDISTRIBUTE_ADD, ripng_zclient,
AFI_IP6, i, 0, ripng->vrf->vrf_id);
}
}
@@ -172,7 +172,7 @@ void ripng_redistribute_disable(struct ripng *ripng)
if (!ripng_redistribute_check(ripng, i))
continue;
- zebra_redistribute_send(ZEBRA_REDISTRIBUTE_DELETE, zclient,
+ zebra_redistribute_send(ZEBRA_REDISTRIBUTE_DELETE, ripng_zclient,
AFI_IP6, i, 0, ripng->vrf->vrf_id);
}
}
@@ -182,7 +182,7 @@ void ripng_redistribute_write(struct vty *vty, struct ripng *ripng)
int i;
for (i = 0; i < ZEBRA_ROUTE_MAX; i++) {
- if (i == zclient->redist_default
+ if (i == ripng_zclient->redist_default
|| !ripng_redistribute_check(ripng, i))
continue;
@@ -199,7 +199,7 @@ void ripng_zebra_vrf_register(struct vrf *vrf)
zlog_debug("%s: register VRF %s(%u) to zebra", __func__,
vrf->name, vrf->vrf_id);
- zclient_send_reg_requests(zclient, vrf->vrf_id);
+ zclient_send_reg_requests(ripng_zclient, vrf->vrf_id);
}
void ripng_zebra_vrf_deregister(struct vrf *vrf)
@@ -211,7 +211,7 @@ void ripng_zebra_vrf_deregister(struct vrf *vrf)
zlog_debug("%s: deregister VRF %s(%u) from zebra.", __func__,
vrf->name, vrf->vrf_id);
- zclient_send_dereg_requests(zclient, vrf->vrf_id);
+ zclient_send_dereg_requests(ripng_zclient, vrf->vrf_id);
}
static void ripng_zebra_connected(struct zclient *zclient)
@@ -232,19 +232,19 @@ static void ripng_zebra_capabilities(struct zclient_capabilities *cap)
}
/* Initialize zebra structure and it's commands. */
-void zebra_init(struct event_loop *master)
+void zebra_init(struct event_loop *mst)
{
/* Allocate zebra structure. */
- zclient = zclient_new(master, &zclient_options_default, ripng_handlers,
- array_size(ripng_handlers));
- zclient_init(zclient, ZEBRA_ROUTE_RIPNG, 0, &ripngd_privs);
+ ripng_zclient = zclient_new(mst, &zclient_options_default, ripng_handlers,
+ array_size(ripng_handlers));
+ zclient_init(ripng_zclient, ZEBRA_ROUTE_RIPNG, 0, &ripngd_privs);
- zclient->zebra_connected = ripng_zebra_connected;
- zclient->zebra_capabilities = ripng_zebra_capabilities;
+ ripng_zclient->zebra_connected = ripng_zebra_connected;
+ ripng_zclient->zebra_capabilities = ripng_zebra_capabilities;
}
void ripng_zebra_stop(void)
{
- zclient_stop(zclient);
- zclient_free(zclient);
+ zclient_stop(ripng_zclient);
+ zclient_free(ripng_zclient);
}