diff options
author | Jan Moskyto Matejka <mq@ucw.cz> | 2016-04-08 13:08:03 +0200 |
---|---|---|
committer | Jan Moskyto Matejka <mq@ucw.cz> | 2016-04-08 13:09:06 +0200 |
commit | 2003a1840731bd57365876e48c96c5a1ea0348cb (patch) | |
tree | c473a93f4027ea2706ccac3502ccef36736fbb6d /proto/pipe/pipe.c | |
parent | 4bdf1881dc6230b742d7efcaad8eeac4ed25f445 (diff) |
Route update: move table lookup from protocols into rte_update2().
Many protocols do almost the same when creating a rte_update request
before calling rte_update2(). This commit should simplify the protocol
side of the route-creation routine.
Diffstat (limited to 'proto/pipe/pipe.c')
-rw-r--r-- | proto/pipe/pipe.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c index f3df3e71..d40b3f91 100644 --- a/proto/pipe/pipe.c +++ b/proto/pipe/pipe.c @@ -50,7 +50,6 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o struct channel *dst = (src_ch == p->pri) ? p->sec : p->pri; struct rte_src *src; - net *nn; rte *e; rta a; @@ -64,7 +63,6 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o return; } - nn = net_get(dst->table, n->n.addr); if (new) { memcpy(&a, new->attrs, sizeof(rta)); @@ -73,7 +71,6 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o a.eattrs = attrs; a.hostentry = NULL; e = rte_get_temp(&a); - e->net = nn; e->pflags = 0; /* Copy protocol specific embedded attributes. */ @@ -90,7 +87,7 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o } src_ch->table->pipe_busy = 1; - rte_update2(dst, nn, e, src); + rte_update2(dst, n->n.addr, e, src); src_ch->table->pipe_busy = 0; } |