summaryrefslogtreecommitdiff
path: root/sysdep/unix/krt.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2020-04-10 17:08:29 +0200
committerMaria Matejka <mq@ucw.cz>2021-10-13 19:09:04 +0200
commit5cff1d5f022755df61af6fc21cc4f2e5d384404e (patch)
treed98b4b352a47257fe3943dcb050ff73c5c14aecf /sysdep/unix/krt.c
parenteb937358c087eaeb6f209660cc7ecfe6d6eff739 (diff)
Route: moved rte_src pointer from rta to rte
It is an auxiliary key in the routing table, not a route attribute.
Diffstat (limited to 'sysdep/unix/krt.c')
-rw-r--r--sysdep/unix/krt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index 65d8d968..c03fa047 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -300,7 +300,7 @@ krt_learn_announce_update(struct krt_proto *p, rte *e)
{
net *n = e->net;
rta *aa = rta_clone(e->attrs);
- rte *ee = rte_get_temp(aa);
+ rte *ee = rte_get_temp(aa, p->p.main_source);
ee->pflags = EA_ID_FLAG(EA_KRT_SOURCE) | EA_ID_FLAG(EA_KRT_METRIC);
ee->u.krt = e->u.krt;
rte_update(&p->p, n->n.addr, ee);
@@ -909,7 +909,7 @@ static int
krt_preexport(struct proto *P, rte *e)
{
// struct krt_proto *p = (struct krt_proto *) P;
- if (e->attrs->src->proto == P)
+ if (e->src->proto == P)
return -1;
if (!krt_capable(e))