diff options
author | Maria Matejka <mq@ucw.cz> | 2022-11-07 09:51:21 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-11-07 09:51:21 +0100 |
commit | d2d83c47776e1655a73e9134c87590bae084b03b (patch) | |
tree | efeb226ca34e9c33412efd20f2bd0c8279e265ac /sysdep/unix | |
parent | 8d7f516b2a255a40659ce7857fe30937a6ecf7f2 (diff) | |
parent | 0f2be469f897b6d9f925563bbf522438c83522ea (diff) |
Merge commit '0f2be469' into thread-next
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/krt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index b0033a65..3b6c91cc 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -302,6 +302,12 @@ krt_uptodate(rte *a, rte *b) return (a->attrs == b->attrs); } +static void +krt_learn_alien_attr(struct channel *c, rte *e) +{ + ea_set_attr_u32(&e->attrs, &ea_gen_preference, 0, c->preference); +} + /* Called when alien route is discovered during scan */ static void krt_learn_scan(struct krt_proto *p, rte *e) @@ -311,7 +317,7 @@ krt_learn_scan(struct krt_proto *p, rte *e) .src = rt_get_source(&p->p, krt_metric(e)), }; - ea_set_attr_u32(&e0.attrs, &ea_gen_preference, 0, p->p.main_channel->preference); + krt_learn_alien_attr(p->p.main_channel, &e0); rte_update(p->p.main_channel, e->net, &e0, e0.src); rt_unlock_source(e0.src); |