summaryrefslogtreecommitdiff
path: root/nest/rt-dev.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-05-30 17:36:36 +0200
committerMaria Matejka <mq@ucw.cz>2022-05-30 17:37:08 +0200
commit1493695c6ba2b169523f7c2097fac8e8343352fe (patch)
tree0a0e5296b7b53d79a99aa3ebf254c124e1373414 /nest/rt-dev.c
parent7b0c89a47fa1f63248ceaa1e9c1b3948dd29a68d (diff)
parentf15f2fcee7eeb5a100bd204a0e67018e25953420 (diff)
Merge commit 'f15f2fcee7eeb5a100bd204a0e67018e25953420' into haugesund
Diffstat (limited to 'nest/rt-dev.c')
-rw-r--r--nest/rt-dev.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nest/rt-dev.c b/nest/rt-dev.c
index b0ad34e6..107f67a7 100644
--- a/nest/rt-dev.c
+++ b/nest/rt-dev.c
@@ -81,11 +81,16 @@ dev_ifa_notify(struct proto *P, uint flags, struct ifa *ad)
rta a0 = {
.dest = RTD_UNICAST,
- .nh.iface = ad->iface,
+ };
+
+ struct nexthop_adata nhad = {
+ .nh = { .iface = ad->iface, },
+ .ad = { .length = (void *) NEXTHOP_NEXT(&nhad.nh) - (void *) nhad.ad.data, },
};
ea_set_attr_u32(&a0.eattrs, &ea_gen_preference, 0, c->preference);
ea_set_attr_u32(&a0.eattrs, &ea_gen_source, 0, RTS_DEVICE);
+ ea_set_attr_data(&a0.eattrs, &ea_gen_nexthop, 0, nhad.ad.data, nhad.ad.length);
rte e0 = {
.attrs = rta_lookup(&a0),