From 5cff1d5f022755df61af6fc21cc4f2e5d384404e Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Fri, 10 Apr 2020 17:08:29 +0200 Subject: Route: moved rte_src pointer from rta to rte It is an auxiliary key in the routing table, not a route attribute. --- proto/static/static.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'proto/static/static.c') diff --git a/proto/static/static.c b/proto/static/static.c index 2d141c07..6d3871cc 100644 --- a/proto/static/static.c +++ b/proto/static/static.c @@ -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; } -- cgit v1.2.3