forked from Mirror/frr
ripng: clean up -Wshadow compiler warnings
Clean up -Wshadow compiler warnings. Signed-off-by: Mark Stapp <mjs@cisco.com>
This commit is contained in:
parent
536944dc53
commit
a2acd59afd
|
@ -19,7 +19,7 @@
|
||||||
#include "ripngd/ripng_debug.h"
|
#include "ripngd/ripng_debug.h"
|
||||||
|
|
||||||
/* All information about zebra. */
|
/* All information about zebra. */
|
||||||
struct zclient *zclient = NULL;
|
struct zclient *ripng_zclient = NULL;
|
||||||
|
|
||||||
/* Send ECMP routes to zebra. */
|
/* Send ECMP routes to zebra. */
|
||||||
static void ripng_zebra_ipv6_send(struct ripng *ripng, struct agg_node *rp,
|
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;
|
api.tag = rinfo->tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
zclient_route_send(cmd, zclient, &api);
|
zclient_route_send(cmd, ripng_zclient, &api);
|
||||||
|
|
||||||
if (IS_RIPNG_DEBUG_ZEBRA) {
|
if (IS_RIPNG_DEBUG_ZEBRA) {
|
||||||
if (ripng->ecmp)
|
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)
|
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);
|
type, 0, ripng->vrf->vrf_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ripng_redistribute_conf_delete(struct ripng *ripng, int type)
|
void ripng_redistribute_conf_delete(struct ripng *ripng, int type)
|
||||||
{
|
{
|
||||||
if (zclient->sock > 0)
|
if (ripng_zclient->sock > 0)
|
||||||
zebra_redistribute_send(ZEBRA_REDISTRIBUTE_DELETE, zclient,
|
zebra_redistribute_send(ZEBRA_REDISTRIBUTE_DELETE, ripng_zclient,
|
||||||
AFI_IP6, type, 0, ripng->vrf->vrf_id);
|
AFI_IP6, type, 0, ripng->vrf->vrf_id);
|
||||||
|
|
||||||
ripng_redistribute_withdraw(ripng, type);
|
ripng_redistribute_withdraw(ripng, type);
|
||||||
|
@ -161,7 +161,7 @@ void ripng_redistribute_enable(struct ripng *ripng)
|
||||||
if (!ripng_redistribute_check(ripng, i))
|
if (!ripng_redistribute_check(ripng, i))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
zebra_redistribute_send(ZEBRA_REDISTRIBUTE_ADD, zclient,
|
zebra_redistribute_send(ZEBRA_REDISTRIBUTE_ADD, ripng_zclient,
|
||||||
AFI_IP6, i, 0, ripng->vrf->vrf_id);
|
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))
|
if (!ripng_redistribute_check(ripng, i))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
zebra_redistribute_send(ZEBRA_REDISTRIBUTE_DELETE, zclient,
|
zebra_redistribute_send(ZEBRA_REDISTRIBUTE_DELETE, ripng_zclient,
|
||||||
AFI_IP6, i, 0, ripng->vrf->vrf_id);
|
AFI_IP6, i, 0, ripng->vrf->vrf_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ void ripng_redistribute_write(struct vty *vty, struct ripng *ripng)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < ZEBRA_ROUTE_MAX; 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))
|
|| !ripng_redistribute_check(ripng, i))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ void ripng_zebra_vrf_register(struct vrf *vrf)
|
||||||
zlog_debug("%s: register VRF %s(%u) to zebra", __func__,
|
zlog_debug("%s: register VRF %s(%u) to zebra", __func__,
|
||||||
vrf->name, vrf->vrf_id);
|
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)
|
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__,
|
zlog_debug("%s: deregister VRF %s(%u) from zebra.", __func__,
|
||||||
vrf->name, vrf->vrf_id);
|
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)
|
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. */
|
/* Initialize zebra structure and it's commands. */
|
||||||
void zebra_init(struct event_loop *master)
|
void zebra_init(struct event_loop *mst)
|
||||||
{
|
{
|
||||||
/* Allocate zebra structure. */
|
/* Allocate zebra structure. */
|
||||||
zclient = zclient_new(master, &zclient_options_default, ripng_handlers,
|
ripng_zclient = zclient_new(mst, &zclient_options_default, ripng_handlers,
|
||||||
array_size(ripng_handlers));
|
array_size(ripng_handlers));
|
||||||
zclient_init(zclient, ZEBRA_ROUTE_RIPNG, 0, &ripngd_privs);
|
zclient_init(ripng_zclient, ZEBRA_ROUTE_RIPNG, 0, &ripngd_privs);
|
||||||
|
|
||||||
zclient->zebra_connected = ripng_zebra_connected;
|
ripng_zclient->zebra_connected = ripng_zebra_connected;
|
||||||
zclient->zebra_capabilities = ripng_zebra_capabilities;
|
ripng_zclient->zebra_capabilities = ripng_zebra_capabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ripng_zebra_stop(void)
|
void ripng_zebra_stop(void)
|
||||||
{
|
{
|
||||||
zclient_stop(zclient);
|
zclient_stop(ripng_zclient);
|
||||||
zclient_free(zclient);
|
zclient_free(ripng_zclient);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue