From f98e2915794e8641f0704b22cbd9b574514f5b23 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Mon, 1 Jun 2009 14:07:13 +0200 Subject: The pipe cleanup. --- proto/bgp/packets.c | 8 ++++---- proto/ospf/rt.c | 4 ++-- proto/pipe/pipe.c | 2 +- proto/rip/rip.c | 2 +- proto/static/static.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'proto') diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 27adc16..d5397f5 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -705,7 +705,7 @@ bgp_do_rx_update(struct bgp_conn *conn, DECODE_PREFIX(withdrawn, withdrawn_len); DBG("Withdraw %I/%d\n", prefix, pxlen); if (n = net_find(p->p.table, prefix, pxlen)) - rte_update(p->p.table, n, &p->p, NULL); + rte_update(p->p.table, n, &p->p, &p->p, NULL); } if (!attr_len && !nlri_len) /* shortcut */ @@ -724,7 +724,7 @@ bgp_do_rx_update(struct bgp_conn *conn, n = net_get(p->p.table, prefix, pxlen); e->net = n; e->pflags = 0; - rte_update(p->p.table, n, &p->p, e); + rte_update(p->p.table, n, &p->p, &p->p, e); } } bad: @@ -783,7 +783,7 @@ bgp_do_rx_update(struct bgp_conn *conn, DECODE_PREFIX(x, len); DBG("Withdraw %I/%d\n", prefix, pxlen); if (n = net_find(p->p.table, prefix, pxlen)) - rte_update(p->p.table, n, &p->p, NULL); + rte_update(p->p.table, n, &p->p, &p->p, NULL); } } @@ -824,7 +824,7 @@ bgp_do_rx_update(struct bgp_conn *conn, n = net_get(p->p.table, prefix, pxlen); e->net = n; e->pflags = 0; - rte_update(p->p.table, n, &p->p, e); + rte_update(p->p.table, n, &p->p, &p->p, e); } rta_free(a); } diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c index f906de9..79b21e6 100644 --- a/proto/ospf/rt.c +++ b/proto/ospf/rt.c @@ -1003,11 +1003,11 @@ again1: e->pref = p->preference; DBG("Mod rte type %d - %I/%d via %I on iface %s, met %d\n", a0.source, nf->fn.prefix, nf->fn.pxlen, a0.gw, a0.iface ? a0.iface->name : "(none)", nf->n.metric1); - rte_update(p->table, ne, p, e); + rte_update(p->table, ne, p, p, e); } else { - rte_update(p->table, ne, p, NULL); + rte_update(p->table, ne, p, p, NULL); FIB_ITERATE_PUT(&fit, nftmp); fib_delete(fib, nftmp); goto again1; diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c index 74e1bb3..8ff430a 100644 --- a/proto/pipe/pipe.c +++ b/proto/pipe/pipe.c @@ -78,7 +78,7 @@ pipe_send(struct pipe_proto *p, rtable *dest, net *n, rte *new, rte *old, ea_lis } dest->pipe_busy = 1; - rte_update2(dest, nn, &p->p, (p->mode == PIPE_OPAQUE) ? &p->p : src, e); + rte_update(dest, nn, &p->p, (p->mode == PIPE_OPAQUE) ? &p->p : src, e); dest->pipe_busy = 0; } diff --git a/proto/rip/rip.c b/proto/rip/rip.c index ab417f0..c655cc3 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -268,7 +268,7 @@ rip_rte_update_if_better(rtable *tab, net *net, struct proto *p, rte *new) if (!old || p->rte_better(new, old) || (ipa_equal(old->attrs->from, new->attrs->from) && (old->u.rip.metric != new->u.rip.metric)) ) - rte_update(tab, net, p, new); + rte_update(tab, net, p, p, new); } /* diff --git a/proto/static/static.c b/proto/static/static.c index c532479..c71d1da 100644 --- a/proto/static/static.c +++ b/proto/static/static.c @@ -60,7 +60,7 @@ static_install(struct proto *p, struct static_route *r, struct iface *ifa) e = rte_get_temp(aa); e->net = n; e->pflags = 0; - rte_update(p->table, n, p, e); + rte_update(p->table, n, p, p, e); r->installed = 1; } @@ -75,7 +75,7 @@ static_remove(struct proto *p, struct static_route *r) DBG("Removing static route %I/%d\n", r->net, r->masklen); n = net_find(p->table, r->net, r->masklen); if (n) - rte_update(p->table, n, p, NULL); + rte_update(p->table, n, p, p, NULL); r->installed = 0; } -- cgit v1.2.3