diff options
Diffstat (limited to 'nest/rt-dev.c')
-rw-r--r-- | nest/rt-dev.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/nest/rt-dev.c b/nest/rt-dev.c index 63f8a26b..7f45985f 100644 --- a/nest/rt-dev.c +++ b/nest/rt-dev.c @@ -67,12 +67,10 @@ dev_ifa_notify(struct proto *P, uint flags, struct ifa *ad) /* Use iface ID as local source ID */ struct rte_src *src = rt_get_source(P, ad->iface->index); - rte_update2(c, net, NULL, src); + rte_update(c, net, NULL, src); } else if (flags & IF_CHANGE_UP) { - rte *e; - DBG("dev_if_notify: %s:%I going up\n", ad->iface->name, ad->ip); if (cf->check_link && !(ad->iface->flags & IF_LINK_UP)) @@ -91,9 +89,12 @@ dev_ifa_notify(struct proto *P, uint flags, struct ifa *ad) 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); - e = rte_get_temp(rta_lookup(ea), src); - e->pflags = 0; - rte_update2(c, net, e, src); + rte e0 = { + .attrs = ea, + .src = src, + }; + + rte_update(c, net, &e0, src); } } |