summaryrefslogtreecommitdiff
path: root/proto/ospf/rt.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-03-09 13:13:05 +0100
committerMaria Matejka <mq@ucw.cz>2022-03-09 13:13:05 +0100
commit92b832380d31fc9995d6e45b3db4ce496fcb7837 (patch)
treed76415a8847aef820bb9c935a3906d670cfa7aed /proto/ospf/rt.c
parent9b6db9f9b8e561d215e1df01169b15a9dfaba1b9 (diff)
parent1b9189d5fdab672f91600b7e72a1deeab277eafc (diff)
Merge commit '1b9189d5' into haugesund
Diffstat (limited to 'proto/ospf/rt.c')
-rw-r--r--proto/ospf/rt.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c
index 471bb586..3e208023 100644
--- a/proto/ospf/rt.c
+++ b/proto/ospf/rt.c
@@ -2096,15 +2096,18 @@ again1:
.u.data = nf->n.rid,
};
- rta *a = rta_lookup(&a0);
- rte *e = rte_get_temp(a, p->p.main_source);
-
rta_free(nf->old_rta);
- nf->old_rta = rta_clone(a);
+ nf->old_rta = rta_lookup(&a0);
+
+ rte e0 = {
+ .attrs = nf->old_rta,
+ .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_rta)
@@ -2113,7 +2116,7 @@ again1:
rta_free(nf->old_rta);
nf->old_rta = 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 */
@@ -2129,7 +2132,6 @@ again1:
}
FIB_ITERATE_END;
-
WALK_LIST(oa, p->area_list)
{
/* Cleanup ASBR hash tables */