}
void
-ospf_ia_network_route (struct route_table *rt, struct prefix_ipv4 *p,
- struct ospf_route *new_or, struct ospf_route *abr_or)
+ospf_ia_network_route (struct ospf *ospf, struct route_table *rt,
+ struct prefix_ipv4 *p, struct ospf_route *new_or,
+ struct ospf_route *abr_or)
{
struct route_node *rn1;
struct ospf_route *or;
zlog_info ("ospf_ia_network_route(): "
"Found a route to the same network");
/* Check the existing route. */
- if ((res = ospf_route_cmp (new_or, or)) < 0)
+ if ((res = ospf_route_cmp (ospf, new_or, or)) < 0)
{
/* New route is better, so replace old one. */
ospf_route_subst (rn1, new_or, abr_or);
{
/* New and old route are equal, so next hops can be added. */
route_lock_node (rn1);
- ospf_route_copy_nexthops (or, abr_or->path);
+ ospf_route_copy_nexthops (or, abr_or->paths);
route_unlock_node (rn1);
/* new route can be deleted, because existing route has been updated. */
}
void
-ospf_ia_router_route (struct route_table *rt, struct prefix_ipv4 *p,
+ospf_ia_router_route (struct ospf *ospf, struct route_table *rtrs,
+ struct prefix_ipv4 *p,
struct ospf_route *new_or, struct ospf_route *abr_or)
{
- struct route_node *rn;
struct ospf_route *or = NULL;
+ struct route_node *rn;
int ret;
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_ia_router_route(): considering %s/%d",
inet_ntoa (p->prefix), p->prefixlen);
/* Find a route to the same dest */
- rn = route_node_get (rt,(struct prefix *) p);
+ rn = route_node_get (rtrs, (struct prefix *) p);
if (rn->info == NULL)
/* This is a new route */
else
{
struct ospf_area *or_area;
- or_area = ospf_area_lookup_by_area_id (new_or->u.std.area_id);
+ or_area = ospf_area_lookup_by_area_id (ospf, new_or->u.std.area_id);
assert (or_area);
/* This is an additional route */
route_unlock_node (rn);
- or = ospf_find_asbr_route_through_area (rt, p, or_area);
+ or = ospf_find_asbr_route_through_area (rtrs, p, or_area);
}
if (or)
zlog_info ("ospf_ia_router_route(): "
"a route to the same ABR through the same area exists");
/* New route is better */
- if ((ret = ospf_route_cmp (new_or, or)) < 0)
+ if ((ret = ospf_route_cmp (ospf, new_or, or)) < 0)
{
listnode_delete (rn->info, or);
ospf_route_free (or);
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_ia_router_route(): merging the new route");
- ospf_route_copy_nexthops (or, abr_or->path);
+ ospf_route_copy_nexthops (or, abr_or->paths);
ospf_route_free (new_or);
return;
}
}
}
- ospf_route_copy_nexthops (new_or, abr_or->path);
+ ospf_route_copy_nexthops (new_or, abr_or->paths);
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_ia_router_route(): adding the new route");
}
\f
-struct ia_args
-{
- struct route_table *rt;
- struct route_table *rtrs;
- struct ospf_area *area;
-};
-
int
-process_summary_lsa (struct ospf_lsa *l, void *v, int i)
+process_summary_lsa (struct ospf_area *area, struct route_table *rt,
+ struct route_table *rtrs, struct ospf_lsa *lsa)
{
+ struct ospf *ospf = area->ospf;
struct ospf_area_range *range;
struct ospf_route *abr_or, *new_or;
struct summary_lsa *sl;
struct prefix_ipv4 p, abr;
u_int32_t metric;
- struct ia_args *args;
- if (l == NULL)
+ if (lsa == NULL)
return 0;
- args = (struct ia_args *) v;
- sl = (struct summary_lsa *) l->data;
+ sl = (struct summary_lsa *) lsa->data;
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("process_summary_lsa(): LS ID: %s", inet_ntoa (sl->header.id));
if (metric == OSPF_LS_INFINITY)
return 0;
- if (IS_LSA_MAXAGE (l))
+ if (IS_LSA_MAXAGE (lsa))
return 0;
- if (ospf_lsa_is_self_originated (l))
+ if (ospf_lsa_is_self_originated (area->ospf, lsa))
return 0;
p.family = AF_INET;
apply_mask_ipv4 (&p);
if (sl->header.type == OSPF_SUMMARY_LSA &&
- (range = ospf_area_range_match_any (ospf_top, &p)) &&
+ (range = ospf_area_range_match_any (ospf, &p)) &&
ospf_area_range_active (range))
return 0;
- if (ospf_top->abr_type != OSPF_ABR_STAND &&
- args->area->external_routing != OSPF_AREA_DEFAULT &&
+ if (ospf->abr_type != OSPF_ABR_STAND &&
+ area->external_routing != OSPF_AREA_DEFAULT &&
p.prefix.s_addr == OSPF_DEFAULT_DESTINATION &&
p.prefixlen == 0)
return 0; /* Ignore summary default from a stub area */
abr.prefixlen = IPV4_MAX_BITLEN;
apply_mask_ipv4 (&abr);
- abr_or = ospf_find_abr_route (args->rtrs, &abr, args->area);
+ abr_or = ospf_find_abr_route (rtrs, &abr, area);
if (abr_or == NULL)
return 0;
new_or->u.std.options = sl->header.options;
new_or->u.std.origin = (struct lsa_header *) sl;
new_or->cost = abr_or->cost + metric;
- new_or->u.std.area_id = args->area->area_id;
+ new_or->u.std.area_id = area->area_id;
#ifdef HAVE_NSSA
- new_or->u.std.external_routing = args->area->external_routing;
+ new_or->u.std.external_routing = area->external_routing;
#endif /* HAVE_NSSA */
new_or->path_type = OSPF_PATH_INTER_AREA;
if (sl->header.type == OSPF_SUMMARY_LSA)
- ospf_ia_network_route (args->rt, &p, new_or, abr_or);
+ ospf_ia_network_route (ospf, rt, &p, new_or, abr_or);
else
{
new_or->type = OSPF_DESTINATION_ROUTER;
new_or->u.std.flags = ROUTER_LSA_EXTERNAL;
- ospf_ia_router_route (args->rtrs, &p, new_or, abr_or);
+ ospf_ia_router_route (ospf, rtrs, &p, new_or, abr_or);
}
return 0;
}
void
-ospf_examine_summaries (struct ospf_area * area,
+ospf_examine_summaries (struct ospf_area *area,
struct route_table *lsdb_rt,
struct route_table *rt,
struct route_table *rtrs)
{
- struct ia_args args = {rt, rtrs, area};
- foreach_lsa (lsdb_rt, &args, 0, process_summary_lsa);
+ struct ospf_lsa *lsa;
+ struct route_node *rn;
+
+ LSDB_LOOP (lsdb_rt, rn, lsa)
+ process_summary_lsa (area, rt, rtrs, lsa);
}
int
}
void
-ospf_update_network_route (struct route_table *rt,
+ospf_update_network_route (struct ospf *ospf,
+ struct route_table *rt,
struct route_table *rtrs,
struct summary_lsa *lsa,
struct prefix_ipv4 *p,
if (! rn)
{
- if (ospf_top->abr_type != OSPF_ABR_SHORTCUT)
+ if (ospf->abr_type != OSPF_ABR_SHORTCUT)
return; /* Standard ABR can update only already installed
backbone paths */
if (IS_DEBUG_OSPF_EVENT)
return;
}
- if (ospf_top->abr_type == OSPF_ABR_SHORTCUT)
+ if (ospf->abr_type == OSPF_ABR_SHORTCUT)
{
if (or->path_type == OSPF_PATH_INTRA_AREA &&
!OSPF_IS_AREA_ID_BACKBONE (or->u.std.area_id))
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_update_network_route(): "
"new route is same distance, adding nexthops");
- ospf_route_copy_nexthops (or, abr_or->path);
+ ospf_route_copy_nexthops (or, abr_or->paths);
}
if (or->cost > cost)
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_update_network_route(): "
"new route is better, overriding nexthops");
- ospf_route_subst_nexthops (or, abr_or->path);
+ ospf_route_subst_nexthops (or, abr_or->paths);
or->cost = cost;
- if ((ospf_top->abr_type == OSPF_ABR_SHORTCUT) &&
+ if ((ospf->abr_type == OSPF_ABR_SHORTCUT) &&
!OSPF_IS_AREA_ID_BACKBONE (or->u.std.area_id))
{
or->path_type = OSPF_PATH_INTER_AREA;
}
void
-ospf_update_router_route (struct route_table *rtrs,
+ospf_update_router_route (struct ospf *ospf,
+ struct route_table *rtrs,
struct summary_lsa *lsa,
struct prefix_ipv4 *p,
struct ospf_area *area)
/* First try to find a backbone path,
because standard ABR can update only BB-associated paths */
- if ((ospf_top->backbone == NULL) &&
- (ospf_top->abr_type != OSPF_ABR_SHORTCUT))
+ if ((ospf->backbone == NULL) &&
+ (ospf->abr_type != OSPF_ABR_SHORTCUT))
/* no BB area, not Shortcut ABR, exiting */
return;
- or = ospf_find_asbr_route_through_area (rtrs, p, ospf_top->backbone);
+ or = ospf_find_asbr_route_through_area (rtrs, p, ospf->backbone);
if (or == NULL)
{
- if (ospf_top->abr_type != OSPF_ABR_SHORTCUT)
+ if (ospf->abr_type != OSPF_ABR_SHORTCUT)
/* route to ASBR through the BB not found
the router is not Shortcut ABR, exiting */
#endif /* HAVE_NSSA */
new_or->path_type = OSPF_PATH_INTER_AREA;
new_or->u.std.flags = ROUTER_LSA_EXTERNAL;
- ospf_ia_router_route (rtrs, p, new_or, abr_or);
+ ospf_ia_router_route (ospf, rtrs, p, new_or, abr_or);
return;
}
return;
else if (or->cost == cost)
- ospf_route_copy_nexthops (or, abr_or->path);
+ ospf_route_copy_nexthops (or, abr_or->paths);
else if (or->cost > cost)
{
- ospf_route_subst_nexthops (or, abr_or->path);
+ ospf_route_subst_nexthops (or, abr_or->paths);
or->cost = cost;
/* Even if the ABR runs in Shortcut mode, we can't change
}
int
-process_transit_summary_lsa (struct ospf_lsa *l, void *v, int i)
+process_transit_summary_lsa (struct ospf_area *area, struct route_table *rt,
+ struct route_table *rtrs, struct ospf_lsa *lsa)
{
+ struct ospf *ospf = area->ospf;
struct summary_lsa *sl;
struct prefix_ipv4 p;
u_int32_t metric;
- struct ia_args *args;
- if (l == NULL)
+ if (lsa == NULL)
return 0;
- args = (struct ia_args *) v;
- sl = (struct summary_lsa *) l->data;
+ sl = (struct summary_lsa *) lsa->data;
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("process_transit_summaries(): LS ID: %s",
- inet_ntoa (l->data->id));
+ inet_ntoa (lsa->data->id));
metric = GET_METRIC (sl->metric);
if (metric == OSPF_LS_INFINITY)
return 0;
}
- if (IS_LSA_MAXAGE (l))
+ if (IS_LSA_MAXAGE (lsa))
{
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("process_transit_summaries(): This LSA is too old");
return 0;
}
- if (ospf_lsa_is_self_originated (l))
+ if (ospf_lsa_is_self_originated (area->ospf, lsa))
{
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("process_transit_summaries(): This LSA is mine, skip");
apply_mask_ipv4 (&p);
if (sl->header.type == OSPF_SUMMARY_LSA)
- ospf_update_network_route (args->rt, args->rtrs, sl, &p, args->area);
+ ospf_update_network_route (ospf, rt, rtrs, sl, &p, area);
else
- ospf_update_router_route (args->rtrs, sl, &p, args->area);
+ ospf_update_router_route (ospf, rtrs, sl, &p, area);
return 0;
}
void
ospf_examine_transit_summaries (struct ospf_area *area,
- /* struct ospf_lsdb *lsdb, */
struct route_table *lsdb_rt,
struct route_table *rt,
struct route_table *rtrs)
{
- struct ia_args args = {rt, rtrs, area};
+ struct ospf_lsa *lsa;
+ struct route_node *rn;
- /* ospf_lsdb_iterator (lsdb, &args, 0, process_transit_summary_lsa); */
- foreach_lsa (lsdb_rt, &args, 0, process_transit_summary_lsa);
+ LSDB_LOOP (lsdb_rt, rn, lsa)
+ process_transit_summary_lsa (area, rt, rtrs, lsa);
}
void
-ospf_ia_routing (struct route_table *rt,
+ospf_ia_routing (struct ospf *ospf,
+ struct route_table *rt,
struct route_table *rtrs)
{
struct ospf_area * area;
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_ia_routing():start");
- if (OSPF_IS_ABR)
+ if (IS_OSPF_ABR (ospf))
{
listnode node;
struct ospf_area *area;
- switch (ospf_top->abr_type)
+ switch (ospf->abr_type)
{
case OSPF_ABR_STAND:
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_ia_routing():Standard ABR");
- if ((area = ospf_top->backbone))
+ if ((area = ospf->backbone))
{
listnode node;
OSPF_EXAMINE_SUMMARIES_ALL (area, rt, rtrs);
- for (node = listhead (ospf_top->areas); node; nextnode (node))
+ for (node = listhead (ospf->areas); node; nextnode (node))
if ((area = getdata (node)) != NULL)
- if (area != ospf_top->backbone)
+ if (area != ospf->backbone)
if (ospf_area_is_transit (area))
OSPF_EXAMINE_TRANSIT_SUMMARIES_ALL (area, rt, rtrs);
}
case OSPF_ABR_CISCO:
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_ia_routing():Alternative Cisco/IBM ABR");
- area = ospf_top->backbone; /* Find the BB */
+ area = ospf->backbone; /* Find the BB */
/* If we have an active BB connection */
- if (area && ospf_act_bb_connection ())
+ if (area && ospf_act_bb_connection (ospf))
{
if (IS_DEBUG_OSPF_EVENT)
{
OSPF_EXAMINE_SUMMARIES_ALL (area, rt, rtrs);
- for (node = listhead (ospf_top->areas); node; nextnode (node))
+ for (node = listhead (ospf->areas); node; nextnode (node))
if ((area = getdata (node)) != NULL)
- if (area != ospf_top->backbone)
+ if (area != ospf->backbone)
if (ospf_area_is_transit (area))
OSPF_EXAMINE_TRANSIT_SUMMARIES_ALL (area, rt, rtrs);
}
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_ia_routing(): "
"Active BB connection not found");
- for (node = listhead (ospf_top->areas); node; nextnode (node))
+ for (node = listhead (ospf->areas); node; nextnode (node))
if ((area = getdata (node)) != NULL)
OSPF_EXAMINE_SUMMARIES_ALL (area, rt, rtrs);
}
case OSPF_ABR_SHORTCUT:
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_ia_routing():Alternative Shortcut");
- area = ospf_top->backbone; /* Find the BB */
+ area = ospf->backbone; /* Find the BB */
/* If we have an active BB connection */
- if (area && ospf_act_bb_connection ())
+ if (area && ospf_act_bb_connection (ospf))
{
if (IS_DEBUG_OSPF_EVENT)
{
OSPF_EXAMINE_SUMMARIES_ALL (area, rt, rtrs);
}
- for (node = listhead (ospf_top->areas); node; nextnode (node))
+ for (node = listhead (ospf->areas); node; nextnode (node))
if ((area = getdata (node)) != NULL)
- if (area != ospf_top->backbone)
+ if (area != ospf->backbone)
if (ospf_area_is_transit (area) ||
((area->shortcut_configured != OSPF_SHORTCUT_DISABLE) &&
- ((ospf_top->backbone == NULL) ||
+ ((ospf->backbone == NULL) ||
((area->shortcut_configured == OSPF_SHORTCUT_ENABLE) &&
area->shortcut_capability))))
OSPF_EXAMINE_TRANSIT_SUMMARIES_ALL (area, rt, rtrs);
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_ia_routing():not ABR, considering all areas");
- for (node = listhead (ospf_top->areas); node; nextnode (node))
+ for (node = listhead (ospf->areas); node; nextnode (node))
if ((area = getdata (node)) != NULL)
OSPF_EXAMINE_SUMMARIES_ALL (area, rt, rtrs);
}
new->ctime = time (NULL);
new->mtime = new->ctime;
+ new->paths = list_new ();
+ new->paths->del = (void (*) (void *))ospf_path_free;
return new;
}
void
ospf_route_free (struct ospf_route *or)
{
- listnode node;
-
- if (or->path)
- {
- for (node = listhead (or->path); node; nextnode (node))
- ospf_path_free (node->data);
-
- list_delete (or->path);
- }
+ if (or->paths)
+ list_delete (or->paths);
XFREE (MTYPE_OSPF_ROUTE, or);
}
{
if (or->type == OSPF_DESTINATION_NETWORK)
{
- if (or->path->count != newor->path->count)
+ if (or->paths->count != newor->paths->count)
return 0;
/* Check each path. */
- for (n1 = listhead (or->path), n2 = listhead (newor->path);
+ for (n1 = listhead (or->paths), n2 = listhead (newor->paths);
n1 && n2; nextnode (n1), nextnode (n2))
{
op = getdata (n1);
if (v->type == OSPF_VERTEX_NETWORK)
{
or->type = OSPF_DESTINATION_NETWORK;
- or->path = list_new ();
- for (nnode = listhead (v->nexthop); nnode; nextnode (nnode))
- {
- nexthop = getdata (nnode);
- path = ospf_path_new ();
- path->nexthop = nexthop->router;
- listnode_add (or->path, path);
- }
+ LIST_LOOP (v->nexthop, nexthop, nnode)
+ {
+ nexthop = getdata (nnode);
+ path = ospf_path_new ();
+ path->nexthop = nexthop->router;
+ listnode_add (or->paths, path);
+ }
}
else
or->type = OSPF_DESTINATION_ROUTER;
cur_or->cost = cost;
- list_delete (cur_or->path);
- cur_or->path = NULL;
+ list_delete (cur_or->paths);
+ cur_or->paths = NULL;
ospf_route_copy_nexthops_from_vertex (cur_or, v);
or->cost = cost;
or->type = OSPF_DESTINATION_NETWORK;
or->u.std.origin = (struct lsa_header *) lsa;
- or->path = list_new ();
/* Nexthop is depend on connection type. */
if (v != area->spf)
path = ospf_path_new ();
path->nexthop.s_addr = 0;
path->oi = oi;
- listnode_add (or->path, path);
+ listnode_add (or->paths, path);
}
else
{
BUFSIZ),
ospf_path_type_str[or->path_type],
or->cost);
- for (pnode = listhead (or->path); pnode; nextnode (pnode))
+ for (pnode = listhead (or->paths); pnode; nextnode (pnode))
{
path = getdata (pnode);
zlog_info (" -> %s", inet_ntoa (path->nexthop));
struct ospf_path *path;
struct vertex_nexthop *nexthop;
- if (to->path == NULL)
- to->path = list_new ();
+ assert (to->paths);
for (nnode = listhead (v->nexthop); nnode; nextnode (nnode))
{
if (nexthop->oi != NULL)
{
- if (! ospf_path_exist (to->path, nexthop->router, nexthop->oi))
+ if (! ospf_path_exist (to->paths, nexthop->router, nexthop->oi))
{
path = ospf_path_new ();
path->nexthop = nexthop->router;
path->oi = nexthop->oi;
- listnode_add (to->path, path);
+ listnode_add (to->paths, path);
}
}
}
{
listnode node;
- if (to->path == NULL)
- to->path = list_new ();
+ assert (to->paths);
for (node = listhead (from); node; nextnode (node))
/* The same routes are just discarded. */
- if (!ospf_path_lookup (to->path, node->data))
- listnode_add (to->path, ospf_path_dup (node->data));
+ if (!ospf_path_lookup (to->paths, node->data))
+ listnode_add (to->paths, ospf_path_dup (node->data));
}
void
ospf_route_subst_nexthops (struct ospf_route *to, list from)
{
- listnode node;
- struct ospf_path *op;
-
- for (node = listhead (to->path); node; nextnode (node))
- if ((op = getdata (node)) != NULL)
- {
- ospf_path_free (op);
- node->data = NULL;
- }
- list_delete_all_node (to->path);
+ list_delete_all_node (to->paths);
ospf_route_copy_nexthops (to, from);
}
route_lock_node (rn);
ospf_route_free (rn->info);
- ospf_route_copy_nexthops (new_or, over->path);
+ ospf_route_copy_nexthops (new_or, over->paths);
rn->info = new_or;
route_unlock_node (rn);
}
rn = route_node_get (rt, (struct prefix *) p);
- ospf_route_copy_nexthops (new_or, over->path);
+ ospf_route_copy_nexthops (new_or, over->paths);
if (rn->info)
{
if (rn->info != NULL)
{
or = rn->info;
- if (listcount (or->path) == 0)
+ if (listcount (or->paths) == 0)
{
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("Pruning route to %s/%d",
or = getdata (node);
- if (listcount (or->path) == 0)
+ if (listcount (or->paths) == 0)
{
if (IS_DEBUG_OSPF_EVENT)
{
}
if (or->type == OSPF_DESTINATION_NETWORK)
- for (pnode = listhead (or->path); pnode; nextnode (pnode))
- {
- path = getdata (pnode);
- if (path->oi != NULL)
- {
- if (path->nexthop.s_addr == 0)
- vty_out (vty, "%24s directly attached to %s%s",
- "", path->oi->ifp->name, VTY_NEWLINE);
- else
- vty_out (vty, "%24s via %s, %s%s", "",
- inet_ntoa (path->nexthop), path->oi->ifp->name,
- VTY_NEWLINE);
- }
- }
+ LIST_LOOP (or->paths, path, pnode)
+ {
+ if (path->oi != NULL)
+ {
+ if (path->nexthop.s_addr == 0)
+ vty_out (vty, "%24s directly attached to %s%s",
+ "", path->oi->ifp->name, VTY_NEWLINE);
+ else
+ vty_out (vty, "%24s via %s, %s%s", "",
+ inet_ntoa (path->nexthop), path->oi->ifp->name,
+ VTY_NEWLINE);
+ }
+ }
}
vty_out (vty, "%s", VTY_NEWLINE);
}
(or->u.std.flags & ROUTER_LSA_BORDER ? ", ABR" : ""),
(or->u.std.flags & ROUTER_LSA_EXTERNAL ? ", ASBR" : ""),
VTY_NEWLINE);
-
- for (pn = listhead (or->path); pn; nextnode (pn))
- {
- path = getdata (pn);
- if (path->nexthop.s_addr == 0)
- vty_out (vty, "%24s directly attached to %s%s",
- "", path->oi->ifp->name, VTY_NEWLINE);
- else
- vty_out (vty, "%24s via %s, %s%s", "",
- inet_ntoa (path->nexthop), path->oi->ifp->name,
- VTY_NEWLINE);
- }
+
+ LIST_LOOP (or->paths, path, pn)
+ {
+ if (path->nexthop.s_addr == 0)
+ vty_out (vty, "%24s directly attached to %s%s",
+ "", path->oi->ifp->name, VTY_NEWLINE);
+ else
+ vty_out (vty, "%24s via %s, %s%s", "",
+ inet_ntoa (path->nexthop), path->oi->ifp->name,
+ VTY_NEWLINE);
+ }
}
}
vty_out (vty, "%s", VTY_NEWLINE);
break;
}
- for (pnode = listhead (er->path); pnode; nextnode (pnode))
+ LIST_LOOP (er->paths, path, pnode)
{
- path = getdata (pnode);
if (path->oi != NULL)
{
if (path->nexthop.s_addr == 0)
- vty_out (vty, "%24s directly attached to %s%s",
- "", path->oi->ifp->name, VTY_NEWLINE);
- else
- vty_out (vty, "%24s via %s, %s%s", "",
- inet_ntoa (path->nexthop), path->oi->ifp->name,
- VTY_NEWLINE);
+ vty_out (vty, "%24s directly attached to %s%s",
+ "", path->oi->ifp->name, VTY_NEWLINE);
+ else
+ vty_out (vty, "%24s via %s, %s%s", "",
+ inet_ntoa (path->nexthop), path->oi->ifp->name,
+ VTY_NEWLINE);
}
}
}
if (OSPF_IF_PARAM_CONFIGURED (oi->params, passive_interface) &&
oi->params->passive_interface == OSPF_IF_PASSIVE)
- vty_out (vty, " passive-interface %s %s%s",
- oi->ifp->name,
+ vty_out (vty, " passive-interface %s %s%s",
+ oi->ifp->name,
inet_ntoa (oi->address->u.prefix4), VTY_NEWLINE);
}