summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_ase.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_ase.c')
-rw-r--r--ospfd/ospf_ase.c27
1 files changed, 5 insertions, 22 deletions
diff --git a/ospfd/ospf_ase.c b/ospfd/ospf_ase.c
index 5d0cae42..d3873561 100644
--- a/ospfd/ospf_ase.c
+++ b/ospfd/ospf_ase.c
@@ -130,18 +130,6 @@ ospf_find_asbr_route_through_area (struct route_table *rtrs,
return NULL;
}
-static void
-ospf_ase_complete_direct_routes (struct ospf_route *ro, struct in_addr nexthop)
-{
- struct listnode *node;
- struct ospf_path *op;
- struct interface *ifp;
-
- for (ALL_LIST_ELEMENTS_RO (ro->paths, node, op))
- if (op->nexthop.s_addr == 0)
- op->nexthop.s_addr = nexthop.s_addr;
-}
-
static int
ospf_ase_forward_address_check (struct ospf *ospf, struct in_addr fwd_addr)
{
@@ -451,8 +439,8 @@ ospf_ase_calculate_route (struct ospf *ospf, struct ospf_lsa * lsa)
/* if there is a Intra/Inter area route to the N
do not install external route */
- if (rn = route_node_lookup (ospf->new_table,
- (struct prefix *) &p))
+ if ((rn = route_node_lookup (ospf->new_table,
+ (struct prefix *) &p)))
{
route_unlock_node(rn);
if (rn->info == NULL)
@@ -463,8 +451,8 @@ ospf_ase_calculate_route (struct ospf *ospf, struct ospf_lsa * lsa)
}
/* Find a route to the same dest */
/* If there is no route, create new one. */
- if (rn = route_node_lookup (ospf->new_external_route,
- (struct prefix *) &p))
+ if ((rn = route_node_lookup (ospf->new_external_route,
+ (struct prefix *) &p)))
route_unlock_node(rn);
if (!rn || (or = rn->info) == NULL)
@@ -475,8 +463,6 @@ ospf_ase_calculate_route (struct ospf *ospf, struct ospf_lsa * lsa)
ospf_route_add (ospf->new_external_route, &p, new, asbr_route);
- if (al->e[0].fwd_addr.s_addr)
- ospf_ase_complete_direct_routes (new, al->e[0].fwd_addr);
return 0;
}
else
@@ -513,8 +499,7 @@ ospf_ase_calculate_route (struct ospf *ospf, struct ospf_lsa * lsa)
if (IS_DEBUG_OSPF (lsa, LSA))
zlog_debug ("Route[External]: New route is better");
ospf_route_subst (rn, new, asbr_route);
- if (al->e[0].fwd_addr.s_addr)
- ospf_ase_complete_direct_routes (new, al->e[0].fwd_addr);
+
or = new;
new = NULL;
}
@@ -531,8 +516,6 @@ ospf_ase_calculate_route (struct ospf *ospf, struct ospf_lsa * lsa)
if (IS_DEBUG_OSPF (lsa, LSA))
zlog_debug ("Route[External]: Routes are equal");
ospf_route_copy_nexthops (or, asbr_route->paths);
- if (al->e[0].fwd_addr.s_addr)
- ospf_ase_complete_direct_routes (or, al->e[0].fwd_addr);
}
}
/* Make sure setting newly calculated ASBR route.*/