diff --git a/nest/rt-dev.c b/nest/rt-dev.c index c728b5f3..8a8d6d6d 100644 --- a/nest/rt-dev.c +++ b/nest/rt-dev.c @@ -83,12 +83,11 @@ dev_ifa_notify(struct proto *P, uint flags, struct ifa *ad) ea_list *ea = NULL; struct nexthop_adata nhad = { .nh = { .iface = ad->iface, }, - .ad = { .length = (void *) NEXTHOP_NEXT(&nhad.nh) - (void *) nhad.ad.data, }, }; ea_set_attr_u32(&ea, &ea_gen_preference, 0, c->preference); ea_set_attr_u32(&ea, &ea_gen_source, 0, RTS_DEVICE); - ea_set_attr_data(&ea, &ea_gen_nexthop, 0, nhad.ad.data, nhad.ad.length); + ea_set_attr_data(&ea, &ea_gen_nexthop, 0, nhad.ad.data, (void *) NEXTHOP_NEXT(&nhad.nh) - (void *) nhad.ad.data); rte e0 = { .attrs = ea,