ospf6d : Transformation changes for ospf6 vrf support.
if (range && !CHECK_FLAG(range->flag, OSPF6_ROUTE_REMOVE)
&& (route->path.area_id != OSPF_AREA_BACKBONE
|| !IS_AREA_TRANSIT(area))) {
- if (is_debug) {
- prefix2str(&range->prefix, buf, sizeof(buf));
- zlog_debug("Suppressed by range %s of area %s",
- buf, route_area->name);
- }
+ if (is_debug)
+ zlog_debug(
+ "Suppressed by range %pFX of area %s",
+ &range->prefix, route_area->name);
ospf6_abr_delete_route(route, summary, summary_table,
- old);
+ old, area->ospf6);
return 0;
}
}
old->nh_list ? listcount(
old->nh_list)
: 0);
- }
if (table->hook_add)
- (*table->hook_add)(old);
+ (*table->hook_add)(old, ospf6);
if ((old->path.origin.id == lsa->header->id) &&
(old->path.origin.adv_router
/* connected prefix to advertise */
for (route = ospf6_route_head(oi->route_connected); route;
route = ospf6_route_best_next(route)) {
- if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) {
- prefix2str(&route->prefix, buf, sizeof(buf));
- zlog_debug(" include %s", buf);
- }
+ if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX))
+ zlog_debug(" include %pFX", &route->prefix);
ospf6_route_add(ospf6_route_copy(route),
- route_advertise);
+ route_advertise, oa->ospf6);
}
}
route->path.area_id = oi->area->area_id;
route->path.type = OSPF6_PATH_TYPE_INTRA;
- if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) {
- prefix2str(&route->prefix, buf, sizeof(buf));
- zlog_debug(" include %s", buf);
- }
+ if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX))
+ zlog_debug(" include %pFX", &route->prefix);
- ospf6_route_add(route, route_advertise);
+ ospf6_route_add(route, route_advertise,
+ oi->area->ospf6);
prefix_num--;
}
if (current != end && IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX))
extern int ospf6_serv_sock(struct ospf6 *ospf6);
extern void ospf6_serv_close(int *ospf6_sock);
- extern int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option);
+ extern int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option,
+ int sockfd);
-extern int ospf6_sendmsg(struct in6_addr *, struct in6_addr *, ifindex_t *,
- struct iovec *, int ospf6_sock);
-extern int ospf6_recvmsg(struct in6_addr *, struct in6_addr *, ifindex_t *,
- struct iovec *, int ospf6_sock);
+extern int ospf6_sendmsg(struct in6_addr *src, struct in6_addr *dst,
+ ifindex_t ifindex, struct iovec *message,
+ int ospf6_sock);
+extern int ospf6_recvmsg(struct in6_addr *src, struct in6_addr *dst,
+ ifindex_t *ifindex, struct iovec *message,
+ int ospf6_sock);
#endif /* OSPF6_NETWORK_H */
#define ADD 0
#define REM 1
- static void ospf6_zebra_route_update(int type, struct ospf6_route *request)
+ static void ospf6_zebra_route_update(int type, struct ospf6_route *request,
+ struct ospf6 *ospf6)
{
struct zapi_route api;
- char buf[PREFIX2STR_BUFFER];
int nhcount;
int ret = 0;
struct prefix *dest;
return;
}
- void ospf6_zebra_route_update_add(struct ospf6_route *request)
+ void ospf6_zebra_route_update_add(struct ospf6_route *request,
+ struct ospf6 *ospf6)
{
- ospf6_zebra_route_update(ADD, request);
+ ospf6_zebra_route_update(ADD, request, ospf6);
}
- void ospf6_zebra_route_update_remove(struct ospf6_route *request)
+ void ospf6_zebra_route_update_remove(struct ospf6_route *request,
+ struct ospf6 *ospf6)
{
- ospf6_zebra_route_update(REM, request);
+ ospf6_zebra_route_update(REM, request, ospf6);
}
- void ospf6_zebra_add_discard(struct ospf6_route *request)
+ void ospf6_zebra_add_discard(struct ospf6_route *request, struct ospf6 *ospf6)
{
struct zapi_route api;
- char buf[INET6_ADDRSTRLEN];
struct prefix *dest = &request->prefix;
if (!CHECK_FLAG(request->flag, OSPF6_ROUTE_BLACKHOLE_ADDED)) {
}
}
- void ospf6_zebra_delete_discard(struct ospf6_route *request)
+ void ospf6_zebra_delete_discard(struct ospf6_route *request,
+ struct ospf6 *ospf6)
{
struct zapi_route api;
- char buf[INET6_ADDRSTRLEN];
struct prefix *dest = &request->prefix;
if (CHECK_FLAG(request->flag, OSPF6_ROUTE_BLACKHOLE_ADDED)) {