diff options
author | Maria Matejka <mq@ucw.cz> | 2020-02-13 16:59:53 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2021-10-13 19:09:04 +0200 |
commit | e42eedb912428aa9af450b0426e53b0a7004dfb1 (patch) | |
tree | e7803a635e792deca9a3337f41731aae26b523e3 /sysdep/bsd/krt-sock.c | |
parent | 3660f19dd534224da4870a507efcef5b36794506 (diff) |
Kernel: Convert the rte-local attributes to extended attributes and flags to pflags
Diffstat (limited to 'sysdep/bsd/krt-sock.c')
-rw-r--r-- | sysdep/bsd/krt-sock.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 5c905bc9..1b0384ce 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -552,16 +552,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 |