diff options
author | Maria Matejka <mq@ucw.cz> | 2020-04-10 17:08:29 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2021-10-13 19:09:04 +0200 |
commit | 5cff1d5f022755df61af6fc21cc4f2e5d384404e (patch) | |
tree | d98b4b352a47257fe3943dcb050ff73c5c14aecf /proto/static | |
parent | eb937358c087eaeb6f209660cc7ecfe6d6eff739 (diff) |
Route: moved rte_src pointer from rta to rte
It is an auxiliary key in the routing table, not a route attribute.
Diffstat (limited to 'proto/static')
-rw-r--r-- | proto/static/static.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |