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

Route: moved rte_src pointer from rta to rte

It is an auxiliary key in the routing table, not a route attribute.
This commit is contained in:
Maria Matejka
2020-04-10 17:08:29 +02:00
parent eb937358c0
commit 5cff1d5f02
19 changed files with 78 additions and 85 deletions

View File

@@ -56,7 +56,7 @@ static void
static_announce_rte(struct static_proto *p, struct static_route *r)
{
rta *a = allocz(RTA_MAX_SIZE);
a->src = static_get_source(p, r->index);
struct rte_src *src = static_get_source(p, r->index);
a->source = RTS_STATIC;
a->scope = SCOPE_UNIVERSE;
a->dest = r->dest;
@@ -103,7 +103,7 @@ static_announce_rte(struct static_proto *p, struct static_route *r)
return;
/* We skip rta_lookup() here */
rte *e = rte_get_temp(a);
rte *e = rte_get_temp(a, src);
e->pflags = 0;
if (r->cmds)
@@ -120,7 +120,7 @@ static_announce_rte(struct static_proto *p, struct static_route *r)
e->net = NULL;
}
rte_update2(p->p.main_channel, r->net, e, a->src);
rte_update2(p->p.main_channel, r->net, e, src);
r->state = SRS_CLEAN;
if (r->cmds)
@@ -132,7 +132,7 @@ withdraw:
if (r->state == SRS_DOWN)
return;
rte_update2(p->p.main_channel, r->net, NULL, a->src);
rte_update2(p->p.main_channel, r->net, NULL, src);
r->state = SRS_DOWN;
}