summaryrefslogtreecommitdiff
path: root/proto/babel
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-04-20 13:56:04 +0200
committerMaria Matejka <mq@ucw.cz>2022-05-04 15:39:21 +0200
commit8ebac84bc8d51e2404ce6d6dc5e35fb261830596 (patch)
treeddf072a6ba02df9647f02e9203a8e4b3f214e108 /proto/babel
parent337c04c45e1472d6d9b531a3c55f1f2d30ebf308 (diff)
Moved advertising router info (FROM attribute) to eattrs
Diffstat (limited to 'proto/babel')
-rw-r--r--proto/babel/babel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/babel/babel.c b/proto/babel/babel.c
index afd0b1e1..f4503b99 100644
--- a/proto/babel/babel.c
+++ b/proto/babel/babel.c
@@ -645,11 +645,12 @@ babel_announce_rte(struct babel_proto *p, struct babel_entry *e)
{
struct {
ea_list l;
- eattr a[4];
+ eattr a[5];
} eattrs = {
.l.count = ARRAY_SIZE(eattrs.a),
.a = {
EA_LITERAL_EMBEDDED(&ea_gen_preference, 0, c->preference),
+ EA_LITERAL_STORE_ADATA(&ea_gen_from, 0, &r->neigh->addr, sizeof(r->neigh->addr)),
EA_LITERAL_EMBEDDED(&ea_babel_metric, 0, r->metric),
EA_LITERAL_STORE_ADATA(&ea_babel_router_id, 0, &r->router_id, sizeof(r->router_id)),
EA_LITERAL_EMBEDDED(&ea_babel_seqno, 0, r->seqno),
@@ -660,7 +661,6 @@ babel_announce_rte(struct babel_proto *p, struct babel_entry *e)
.source = RTS_BABEL,
.scope = SCOPE_UNIVERSE,
.dest = RTD_UNICAST,
- .from = r->neigh->addr,
.nh.gw = r->next_hop,
.nh.iface = r->neigh->ifa->iface,
.eattrs = &eattrs.l,