summaryrefslogtreecommitdiff
path: root/proto/rip
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-03-09 10:56:06 +0100
committerMaria Matejka <mq@ucw.cz>2022-03-09 10:56:06 +0100
commit83d9920f90738e4df75b3cf57335b43c094051cd (patch)
treeef427685ad08c0ca468db1c0c2f462c3b79b3c14 /proto/rip
parentff47cd80dd04bc11692248a40cbf52ee8d351064 (diff)
parent5cff1d5f022755df61af6fc21cc4f2e5d384404e (diff)
Merge commit '5cff1d5f' into haugesund
Conflicts: proto/bgp/attrs.c proto/pipe/pipe.c
Diffstat (limited to 'proto/rip')
-rw-r--r--proto/rip/rip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index e1a235a0..f2e56e93 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -145,7 +145,7 @@ 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,
.dest = RTD_UNICAST,
@@ -189,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;
@@ -339,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;
}
@@ -1198,7 +1198,7 @@ rip_reconfigure(struct proto *P, struct proto_config *CF)
static void
rip_get_route_info(rte *rte, byte *buf)
{
- buf += bsprintf(buf, " (%d/%d)", rte->pref, rte->u.rip.metric);
+ buf += bsprintf(buf, " (%d/%d)", rte->attrs->pref, rte->u.rip.metric);
if (rte->u.rip.tag)
bsprintf(buf, " [%04x]", rte->u.rip.tag);