if (ext)
addr->flags |= DEVADDR_EXTERNAL;
- vlist_add(&iface->proto_ip.addr, &addr->node);
+ vlist_add(&iface->proto_ip.addr, &addr->node, &addr->mask);
return true;
}
}
route->mask = 0;
- route->flags = DEVADDR_DEVICE | (v6 ? DEVADDR_INET6 : DEVADDR_INET4);
- vlist_add(&iface->proto_ip.route, &route->node);
+ route->flags = (v6 ? DEVADDR_INET6 : DEVADDR_INET4);
+ vlist_add(&iface->proto_ip.route, &route->node, &route->mask);
return true;
}