summaryrefslogtreecommitdiff
path: root/proto/pipe
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2017-03-22 14:54:00 +0100
committerJan Moskyto Matejka <mq@ucw.cz>2017-03-22 14:54:00 +0100
commitead7b8f498ddefc0b7373cbba78f9a7ba1dddaa9 (patch)
tree86aa7f38e349b0bdaf31ab30eda0b36427f25c00 /proto/pipe
parentda3cf9eae3085d43a2299bae63e6ceb3828856a5 (diff)
parent61e501da895553abfd2424e56470ab2b457beac4 (diff)
Merge branch 'nexthop-merged' into int-new
Diffstat (limited to 'proto/pipe')
-rw-r--r--proto/pipe/pipe.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c
index 8924c200..310f3c01 100644
--- a/proto/pipe/pipe.c
+++ b/proto/pipe/pipe.c
@@ -51,7 +51,7 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o
struct rte_src *src;
rte *e;
- rta a;
+ rta *a;
if (!new && !old)
return;
@@ -65,12 +65,13 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o
if (new)
{
- memcpy(&a, new->attrs, sizeof(rta));
+ a = alloca(rta_size(new->attrs));
+ memcpy(a, new->attrs, rta_size(new->attrs));
- a.aflags = 0;
- a.eattrs = attrs;
- a.hostentry = NULL;
- e = rte_get_temp(&a);
+ a->aflags = 0;
+ a->eattrs = attrs;
+ a->hostentry = NULL;
+ e = rte_get_temp(a);
e->pflags = 0;
/* Copy protocol specific embedded attributes. */
@@ -78,7 +79,7 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o
e->pref = new->pref;
e->pflags = new->pflags;
- src = a.src;
+ src = a->src;
}
else
{