for (ALL_LIST_ELEMENTS(om6->ospf6, node, nnode, ospf6)) {
for (type = 0; type < ZEBRA_ROUTE_MAX; type++) {
- if (ospf6->rmap[type].name) {
- ospf6->rmap[type].map =
- route_map_lookup_by_name(
- ospf6->rmap[type].name);
-
- if (mapname
- && (strcmp(ospf6->rmap[type].name, mapname)
- == 0)) {
- if (ospf6->rmap[type].map) {
- if (IS_OSPF6_DEBUG_ASBR)
- zlog_debug(
- "%s: route-map %s update, reset redist %s",
- __func__,
- mapname,
- ZROUTE_NAME(
- type));
-
- route_map_counter_increment(
+ if (ospf6->rmap[type].name == NULL)
+ continue;
+ ospf6->rmap[type].map = route_map_lookup_by_name(
+ ospf6->rmap[type].name);
+
+ if (mapname == NULL || strcmp(ospf6->rmap[type].name, mapname))
+ continue;
+ if (ospf6->rmap[type].map) {
+ if (IS_OSPF6_DEBUG_ASBR)
+ zlog_debug(
+ "%s: route-map %s update, reset redist %s",
+ __func__,
+ mapname,
+ ZROUTE_NAME(
+ type));
+
+ route_map_counter_increment(
ospf6->rmap[type].map);
- ospf6_asbr_distribute_list_update(
+ ospf6_asbr_distribute_list_update(
type, ospf6);
- } else {
- /*
- * if the mapname matches a
- * route-map on ospf6 but the
- * map doesn't exist, it is
- * being deleted. flush and then
- * readvertise
- */
- if (IS_OSPF6_DEBUG_ASBR)
- zlog_debug(
- "%s: route-map %s deleted, reset redist %s",
- __func__,
- mapname,
- ZROUTE_NAME(
- type));
- ospf6_asbr_redistribute_unset(
- type, ospf6->vrf_id);
- ospf6_asbr_routemap_set(
- type, mapname,
- ospf6->vrf_id);
- ospf6_asbr_redistribute_set(
- type, ospf6->vrf_id);
- }
- }
- } else
- ospf6->rmap[type].map = NULL;
+ } else {
+ /*
+ * if the mapname matches a
+ * route-map on ospf6 but the
+ * map doesn't exist, it is
+ * being deleted. flush and then
+ * readvertise
+ */
+ if (IS_OSPF6_DEBUG_ASBR)
+ zlog_debug(
+ "%s: route-map %s deleted, reset redist %s",
+ __func__,
+ mapname,
+ ZROUTE_NAME(
+ type));
+ ospf6_asbr_redistribute_unset(
+ type, ospf6->vrf_id);
+ ospf6_asbr_routemap_set(
+ type, mapname,
+ ospf6->vrf_id);
+ ospf6_asbr_redistribute_set(
+ type, ospf6->vrf_id);
+ }
}
}
}
void ospf6_route_show_detail(struct vty *vty, struct ospf6_route *route)
{
- char destination[PREFIX2STR_BUFFER], nexthop[64];
+ char destination[PREFIX2STR_BUFFER];
char area_id[16], id[16], adv_router[16], capa[16], options[16];
struct timeval now, res;
char duration[64];
for (ALL_LIST_ELEMENTS_RO(route->nh_list, node, nh)) {
struct interface *ifp;
/* nexthop */
- inet_ntop(AF_INET6, &nh->address, nexthop, sizeof(nexthop));
ifp = if_lookup_by_index_all_vrf(nh->ifindex);
- vty_out(vty, " %s %.*s\n", nexthop, IFNAMSIZ, ifp->name);
+ vty_out(vty, " %pI6 %.*s\n", &nh->address, IFNAMSIZ, ifp->name);
}
vty_out(vty, "\n");
}