static void
mark_interface_down(struct interface *iface)
{
- interface_del_all_routes(iface);
- interface_del_ctx_addr(iface, NULL);
+ vlist_flush_all(&iface->proto_addr);
+ vlist_flush_all(&iface->proto_route);
device_release(&iface->main_dev);
iface->state = IFS_DOWN;
}
iface->state = IFS_TEARDOWN;
interface_event(iface, IFEV_DOWN);
-
- interface_del_all_routes(iface);
interface_proto_event(iface->proto, PROTO_CMD_TEARDOWN, force);
}
strncpy(iface->name, name, sizeof(iface->name) - 1);
list_add_tail(&iface->list, &interfaces);
INIT_LIST_HEAD(&iface->errors);
- INIT_LIST_HEAD(&iface->address);
- INIT_LIST_HEAD(&iface->routes);
+
+ interface_ip_init(iface);
blobmsg_parse(iface_attrs, IFACE_ATTR_MAX, tb,
blob_data(attr), blob_len(attr));