/* If none is found -- look through all. */
if (listcount(chosen) == 0) {
- list_delete_and_null(&chosen);
+ list_delete(&chosen);
chosen = rn->info;
}
}
if (chosen != rn->info)
- list_delete_and_null(&chosen);
+ list_delete(&chosen);
return best;
}
zlog_debug ("ospf_ase_calculate(): Originating router is not an ASBR");
return NULL;
}
-
+
if (al->e[0].fwd_addr.s_addr != 0)
{
if (IS_DEBUG_OSPF (lsa, LSA))
asbr.prefixlen = IPV4_MAX_BITLEN;
rn = route_node_match (rt_network, (struct prefix *) &asbr);
-
+
if (rn == NULL)
{
if (IS_DEBUG_OSPF (lsa, LSA))
struct prefix_ipv4 asbr, p;
struct route_node *rn;
struct ospf_route *new, * or ;
+ char buf1[INET_ADDRSTRLEN];
int ret;
assert(lsa);
return 0;
}
- if (IS_DEBUG_OSPF(lsa, LSA))
+ if (IS_DEBUG_OSPF(lsa, LSA)) {
+ snprintf(buf1, INET_ADDRSTRLEN, "%s",
+ inet_ntoa(al->header.adv_router));
zlog_debug(
- "Route[External]: Calculate AS-external-LSA to %s/%d",
- inet_ntoa(al->header.id), ip_masklen(al->mask));
+ "Route[External]: Calculate AS-external-LSA to %s/%d adv_router %s",
+ inet_ntoa(al->header.id), ip_masklen(al->mask), buf1);
+ }
+
/* (1) If the cost specified by the LSA is LSInfinity, or if the
LSA's LS age is equal to MaxAge, then examine the next LSA. */
if ((metric = GET_METRIC(al->e[0].metric)) >= OSPF_LS_INFINITY) {
if (!rn || (or = rn->info) == NULL) {
if (IS_DEBUG_OSPF(lsa, LSA))
- zlog_debug("Route[External]: Adding a new route %s/%d",
- inet_ntoa(p.prefix), p.prefixlen);
+ zlog_debug("Route[External]: Adding a new route %s/%d with paths %u",
+ inet_ntoa(p.prefix), p.prefixlen,
+ listcount(asbr_route->paths));
ospf_route_add(ospf->new_external_route, &p, new, asbr_route);
if ((lst = rn->info) != NULL) {
for (ALL_LIST_ELEMENTS(lst, node, nnode, lsa))
ospf_lsa_unlock(&lsa); /* external_lsas lst */
- list_delete_and_null(&lst);
+ list_delete(&lst);
}
route_table_finish(rt);