ospf6_interface_if_del (ifp);
#endif /*0*/
- ifp->ifindex = IFINDEX_DELETED;
+ if_set_index(ifp, IFINDEX_INTERNAL);
return 0;
}
char prefixstr[PREFIX2STR_BUFFER], nexthopstr[128];
prefix2str((struct prefix *)&api.prefix, prefixstr,
sizeof(prefixstr));
- if (nexthop)
- inet_ntop(AF_INET6, nexthop, nexthopstr,
- sizeof(nexthopstr));
- else
- snprintf(nexthopstr, sizeof(nexthopstr), "::");
+ inet_ntop(AF_INET6, nexthop, nexthopstr, sizeof(nexthopstr));
zlog_debug(
"Zebra Receive route %s: %s %s nexthop %s ifindex %ld tag %" ROUTE_TAG_PRI,
SHOW_STR
IPV6_STR
OSPF6_STR
- "Zebra information\n")
+ ZEBRA_STR)
{
int i;
if (zclient == NULL) {
api.safi = SAFI_UNICAST;
api.prefix = *dest;
SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
- api.nexthop_num = nhcount;
- ospf6_route_zebra_copy_nexthops(request, api.nexthops, nhcount);
+ api.nexthop_num = MIN(nhcount, MULTIPATH_NUM);
+ ospf6_route_zebra_copy_nexthops(request, api.nexthops, api.nexthop_num);
SET_FLAG(api.message, ZAPI_MESSAGE_METRIC);
api.metric = (request->path.metric_type == 2 ? request->path.u.cost_e2
: request->path.cost);
memset(&api, 0, sizeof(api));
api.vrf_id = VRF_DEFAULT;
api.type = ZEBRA_ROUTE_OSPF6;
- api.flags = ZEBRA_FLAG_BLACKHOLE;
api.safi = SAFI_UNICAST;
api.prefix = *dest;
+ zapi_route_set_blackhole(&api, BLACKHOLE_NULL);
zclient_route_send(ZEBRA_ROUTE_ADD, zclient, &api);
memset(&api, 0, sizeof(api));
api.vrf_id = VRF_DEFAULT;
api.type = ZEBRA_ROUTE_OSPF6;
- api.flags = ZEBRA_FLAG_BLACKHOLE;
api.safi = SAFI_UNICAST;
api.prefix = *dest;
+ zapi_route_set_blackhole(&api, BLACKHOLE_NULL);
zclient_route_send(ZEBRA_ROUTE_DELETE, zclient, &api);
void ospf6_zebra_init(struct thread_master *master)
{
/* Allocate zebra structure. */
- zclient = zclient_new(master);
- zclient_init(zclient, ZEBRA_ROUTE_OSPF6, 0);
+ zclient = zclient_new_notify(master, &zclient_options_default);
+ zclient_init(zclient, ZEBRA_ROUTE_OSPF6, 0, &ospf6d_privs);
zclient->zebra_connected = ospf6_zebra_connected;
zclient->router_id_update = ospf6_router_id_update_zebra;
zclient->interface_add = ospf6_zebra_if_add;