diff options
author | Maria Matejka <mq@ucw.cz> | 2022-05-30 16:52:38 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-30 16:52:38 +0200 |
commit | 8b4b7c6eaefff43508179b05acbc061fa6b19291 (patch) | |
tree | f341aa39cc7fcf05280def678db764361295bb3d /sysdep/bsd/krt-sock.c | |
parent | b7e2edd4419fecb09b8690f8731e172f0c24789c (diff) | |
parent | cf07d8ad79273a3bbf0617c17e438602e4b64ece (diff) |
Merge commit 'cf07d8ad79273a3bbf0617c17e438602e4b64ece' into haugesund
Diffstat (limited to 'sysdep/bsd/krt-sock.c')
-rw-r--r-- | sysdep/bsd/krt-sock.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index ca7d4c55..32d38693 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -580,15 +580,8 @@ krt_read_route(struct ks_msg *msg, struct krt_proto *p, int scan) done:; rte e0 = { .attrs = &a, .net = net, }; - ea_list *ea = alloca(sizeof(ea_list) + 1 * sizeof(eattr)); - *ea = (ea_list) { .count = 1, .next = e0.attrs->eattrs }; - e0.attrs->eattrs = ea; - - ea->attrs[0] = (eattr) { - .id = EA_KRT_SOURCE, - .type = T_INT, - .u.data = src2, - }; + ea_set_attr(e0.attrs->eattrs, + EA_LITERAL_EMBEDDED(EA_KRT_SOURCE, T_INT, 0, src2)); if (scan) krt_got_route(p, &e0, src); |