summaryrefslogtreecommitdiff
path: root/proto/babel/babel.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/babel/babel.c')
-rw-r--r--proto/babel/babel.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/proto/babel/babel.c b/proto/babel/babel.c
index 246eea00..1d23aef7 100644
--- a/proto/babel/babel.c
+++ b/proto/babel/babel.c
@@ -641,7 +641,6 @@ babel_announce_rte(struct babel_proto *p, struct babel_entry *e)
if (r)
{
rta a0 = {
- .src = p->p.main_source,
.source = RTS_BABEL,
.scope = SCOPE_UNIVERSE,
.dest = RTD_UNICAST,
@@ -660,7 +659,7 @@ babel_announce_rte(struct babel_proto *p, struct babel_entry *e)
a0.nh.flags = RNF_ONLINK;
rta *a = rta_lookup(&a0);
- rte *rte = rte_get_temp(a);
+ rte *rte = rte_get_temp(a, p->p.main_source);
rte->u.babel.seqno = r->seqno;
rte->u.babel.metric = r->metric;
rte->u.babel.router_id = r->router_id;
@@ -673,7 +672,6 @@ babel_announce_rte(struct babel_proto *p, struct babel_entry *e)
{
/* Unreachable */
rta a0 = {
- .src = p->p.main_source,
.source = RTS_BABEL,
.scope = SCOPE_UNIVERSE,
.dest = RTD_UNREACHABLE,
@@ -681,7 +679,7 @@ babel_announce_rte(struct babel_proto *p, struct babel_entry *e)
};
rta *a = rta_lookup(&a0);
- rte *rte = rte_get_temp(a);
+ rte *rte = rte_get_temp(a, p->p.main_source);
memset(&rte->u.babel, 0, sizeof(rte->u.babel));
rte->pflags = 0;
@@ -2236,7 +2234,7 @@ babel_preexport(struct proto *P, struct rte *new)
{
struct rta *a = new->attrs;
/* Reject our own unreachable routes */
- if ((a->dest == RTD_UNREACHABLE) && (a->src->proto == P))
+ if ((a->dest == RTD_UNREACHABLE) && (new->src->proto == P))
return -1;
return 0;
@@ -2277,7 +2275,7 @@ babel_rt_notify(struct proto *P, struct channel *c UNUSED, struct network *net,
if (new)
{
/* Update */
- uint internal = (new->attrs->src->proto == P);
+ uint internal = (new->src->proto == P);
uint rt_seqno = internal ? new->u.babel.seqno : p->update_seqno;
uint rt_metric = ea_get_int(new->attrs->eattrs, EA_BABEL_METRIC, 0);
u64 rt_router_id = internal ? new->u.babel.router_id : p->router_id;