diff options
Diffstat (limited to 'proto/ospf/rt.c')
-rw-r--r-- | proto/ospf/rt.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c index 3889d634..aedf3df6 100644 --- a/proto/ospf/rt.c +++ b/proto/ospf/rt.c @@ -2086,17 +2086,21 @@ again1: ASSERT_DIE(ARRAY_SIZE(eattrs.a) >= eattrs.l.count); - ea_list *a = rta_lookup(&eattrs.l); - rte *e = rte_get_temp(a, p->p.main_source); + ea_list *eal = ea_lookup(&eattrs.l); + ea_free(nf->old_ea); + nf->old_ea = eal; - rta_free(nf->old_ea); - nf->old_ea = rta_clone(a); + rte e0 = { + .attrs = eal, + .src = p->p.main_source, + }; /* DBG("Mod rte type %d - %N via %I on iface %s, met %d\n", a0.source, nf->fn.addr, a0.gw, a0.iface ? a0.iface->name : "(none)", nf->n.metric1); */ - rte_update(&p->p, nf->fn.addr, e); + + rte_update(p->p.main_channel, nf->fn.addr, &e0, p->p.main_source); } } else if (nf->old_ea) @@ -2105,7 +2109,7 @@ again1: rta_free(nf->old_ea); nf->old_ea = NULL; - rte_update(&p->p, nf->fn.addr, NULL); + rte_update(p->p.main_channel, nf->fn.addr, NULL, p->p.main_source); } /* Remove unused rt entry, some special entries are persistent */ @@ -2121,7 +2125,6 @@ again1: } FIB_ITERATE_END; - WALK_LIST(oa, p->area_list) { /* Cleanup ASBR hash tables */ |