struct as_external_lsa *al;
struct prefix_ipv4 p;
struct route_node *rn;
+ struct list *ext_list;
+ struct listnode *node;
+ struct ospf_external *ext;
int type;
al = (struct as_external_lsa *)lsa->data;
p.prefix = lsa->data->id;
p.prefixlen = ip_masklen(al->mask);
- for (type = 0; type <= ZEBRA_ROUTE_MAX; type++) {
+ for (type = 0; type < ZEBRA_ROUTE_MAX; type++) {
int redist_on = 0;
redist_on =
ospf->vrf_id));
// Pending: check for MI above.
if (redist_on) {
- struct list *ext_list;
- struct listnode *node;
- struct ospf_external *ext;
-
ext_list = ospf->external[type];
if (!ext_list)
continue;
}
}
+ if (is_prefix_default(&p) && ospf->external[DEFAULT_ROUTE]) {
+ ext_list = ospf->external[DEFAULT_ROUTE];
+
+ for (ALL_LIST_ELEMENTS_RO(ext_list, node, ext)) {
+ if (!ext->external_info)
+ continue;
+
+ rn = route_node_lookup(ext->external_info,
+ (struct prefix *)&p);
+ if (!rn)
+ continue;
+ route_unlock_node(rn);
+ if (rn->info != NULL)
+ return (struct external_info *)rn->info;
+ }
+ }
return NULL;
}