summaryrefslogtreecommitdiff
path: root/sysdep
diff options
context:
space:
mode:
authorMaria Matejka <mq@jmq.cz>2020-02-10 08:41:05 +0100
committerMaria Matejka <mq@ucw.cz>2021-10-13 19:09:04 +0200
commiteb937358c087eaeb6f209660cc7ecfe6d6eff739 (patch)
treeb21a471c3c7247eb226cee5cbc9bf887bae6023a /sysdep
parentd5a32563df1653952937117133f09143929ff0c2 (diff)
Preference moved to RTA and set explicitly in protocols
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/krt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index da61fc9c..65d8d968 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -433,6 +433,9 @@ krt_learn_async(struct krt_proto *p, rte *e, int new)
net *n = net_get(p->krt_table, n0->n.addr);
rte *g, **gg, *best, **bestp, *old_best;
+ ASSERT(!e->attrs->cached);
+ e->attrs->pref = p->p.main_channel->preference;
+
e->attrs = rta_lookup(e->attrs);
old_best = n->routes;