diff options
author | Maria Matejka <mq@ucw.cz> | 2020-04-10 17:08:29 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2021-10-13 19:09:04 +0200 |
commit | 5cff1d5f022755df61af6fc21cc4f2e5d384404e (patch) | |
tree | d98b4b352a47257fe3943dcb050ff73c5c14aecf /proto/pipe | |
parent | eb937358c087eaeb6f209660cc7ecfe6d6eff739 (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 'proto/pipe')
-rw-r--r-- | proto/pipe/pipe.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c index a2fc2ddf..de86b62b 100644 --- a/proto/pipe/pipe.c +++ b/proto/pipe/pipe.c @@ -65,12 +65,14 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o if (new) { + src = new->src; + a = alloca(rta_size(new->attrs)); memcpy(a, new->attrs, rta_size(new->attrs)); a->cached = 0; a->hostentry = NULL; - e = rte_get_temp(a); + e = rte_get_temp(a, src); e->pflags = 0; /* Copy protocol specific embedded attributes. */ @@ -79,16 +81,14 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o #ifdef CONFIG_BGP /* Hack to cleanup cached value */ - if (e->attrs->src->proto->proto == &proto_bgp) + if (e->src->proto->proto == &proto_bgp) e->u.bgp.stale = -1; #endif - - src = a->src; } else { e = NULL; - src = old->attrs->src; + src = old->src; } src_ch->table->pipe_busy = 1; |