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/rip/rip.c | |
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/rip/rip.c')
-rw-r--r-- | proto/rip/rip.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c index 65147a1f..f2e56e93 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -145,7 +145,6 @@ rip_announce_rte(struct rip_proto *p, struct rip_entry *en) { /* Update */ rta a0 = { - .src = p->p.main_source, .pref = p->p.main_channel->preference, .source = RTS_RIP, .scope = SCOPE_UNIVERSE, @@ -190,7 +189,7 @@ rip_announce_rte(struct rip_proto *p, struct rip_entry *en) } rta *a = rta_lookup(&a0); - rte *e = rte_get_temp(a); + rte *e = rte_get_temp(a, p->p.main_source); e->u.rip.from = a0.nh.iface; e->u.rip.metric = rt_metric; @@ -340,7 +339,7 @@ rip_rt_notify(struct proto *P, struct channel *ch UNUSED, struct network *net, s en->valid = RIP_ENTRY_VALID; en->metric = rt_metric; en->tag = rt_tag; - en->from = (new->attrs->src->proto == P) ? new->u.rip.from : NULL; + en->from = (new->src->proto == P) ? new->u.rip.from : NULL; en->iface = new->attrs->nh.iface; en->next_hop = new->attrs->nh.gw; } |