1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

The pipe cleanup.

This commit is contained in:
Ondrej Zajicek
2009-06-01 14:07:13 +02:00
parent 2d45e09f58
commit f98e291579
11 changed files with 69 additions and 36 deletions

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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);
}
/*

View File

@@ -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;
}