return;
}
- if (!zclient_vnc->redist[family2afi(rn->p.family)][ZEBRA_ROUTE_VNC])
+ if (!vrf_bitmap_check(zclient_vnc->redist[family2afi(rn->p.family)]
+ [ZEBRA_ROUTE_VNC],
+ VRF_DEFAULT))
return;
if (!bgp->rfapi_cfg) {
if (zclient_vnc->sock < 0)
return;
- if (!zclient_vnc->redist[afi][ZEBRA_ROUTE_VNC])
+ if (!vrf_bitmap_check(zclient_vnc->redist[afi][ZEBRA_ROUTE_VNC],
+ VRF_DEFAULT))
return;
if (afi != AFI_IP && afi != AFI_IP6) {
// bgp->redist[afi][type] = 1;
/* Return if already redistribute flag is set. */
- if (zclient_vnc->redist[afi][type])
+ if (vrf_bitmap_check(zclient_vnc->redist[afi][type], VRF_DEFAULT))
return CMD_WARNING_CONFIG_FAILED;
vrf_bitmap_set(zclient_vnc->redist[afi][type], VRF_DEFAULT);
- // zclient_vnc->redist[afi][type] = 1;
+ // vrf_bitmap_set(zclient_vnc->redist[afi][type], VRF_DEFAULT);
/* Return if zebra connection is not established. */
if (zclient_vnc->sock < 0)
bgp->rfapi_cfg->redist[afi][type] = 0;
/* Return if zebra connection is disabled. */
- if (!zclient_vnc->redist[afi][type])
+ if (!vrf_bitmap_check(zclient_vnc->redist[afi][type], VRF_DEFAULT))
return CMD_WARNING_CONFIG_FAILED;
- zclient_vnc->redist[afi][type] = 0;
+ vrf_bitmap_unset(zclient_vnc->redist[afi][type], VRF_DEFAULT);
if (bgp->rfapi_cfg->redist[AFI_IP][type] == 0
&& bgp->rfapi_cfg->redist[AFI_IP6][type] == 0