summaryrefslogtreecommitdiff
path: root/sysdep/bsd/krt-sock.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-03-09 11:01:44 +0100
committerMaria Matejka <mq@ucw.cz>2022-03-09 11:02:55 +0100
commit24773af9e099530aa6ccf4c730ad31c452284228 (patch)
tree373d1835e6b16a4946690fa467f89eba8b0a58b7 /sysdep/bsd/krt-sock.c
parent83d9920f90738e4df75b3cf57335b43c094051cd (diff)
parente42eedb912428aa9af450b0426e53b0a7004dfb1 (diff)
Merge commit 'e42eedb9' into haugesund
Diffstat (limited to 'sysdep/bsd/krt-sock.c')
-rw-r--r--sysdep/bsd/krt-sock.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
index 521f43f3..efdb18a3 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -582,16 +582,21 @@ krt_read_route(struct ks_msg *msg, struct krt_proto *p, int scan)
done:
e = rte_get_temp(&a);
e->net = net;
- e->u.krt.src = src;
- e->u.krt.proto = src2;
- e->u.krt.seen = 0;
- e->u.krt.best = 0;
- e->u.krt.metric = 0;
+
+ ea_list *ea = alloca(sizeof(ea_list) + 1 * sizeof(eattr));
+ *ea = (ea_list) { .count = 1, .next = e->attrs->eattrs };
+ e->attrs->eattrs = ea;
+
+ ea->attrs[0] = (eattr) {
+ .id = EA_KRT_SOURCE,
+ .type = EAF_TYPE_INT,
+ .u.data = src2,
+ };
if (scan)
- krt_got_route(p, e);
+ krt_got_route(p, e, src);
else
- krt_got_route_async(p, e, new);
+ krt_got_route_async(p, e, new, src);
}
static void