+
+ if (!dev)
+ return UBUS_STATUS_INVALID_ARGUMENT;
+
+ interface_set_l3_dev(iface, dev);
+ if (device_claim(&iface->l3_dev) < 0)
+ return UBUS_STATUS_UNKNOWN_ERROR;
+
+ device_set_present(dev, true);
+
+ interface_update_start(iface);
+ }
+
+ proto_apply_ip_settings(iface, data, addr_ext);
+
+ if ((cur = tb[NOTIFY_ROUTES]) != NULL)
+ proto_shell_parse_route_list(state->proto.iface, cur, false);
+
+ if ((cur = tb[NOTIFY_ROUTES6]) != NULL)
+ proto_shell_parse_route_list(state->proto.iface, cur, true);
+
+ if ((cur = tb[NOTIFY_DNS]))
+ interface_add_dns_server_list(&iface->proto_ip, cur);
+
+ if ((cur = tb[NOTIFY_DNS_SEARCH]))
+ interface_add_dns_search_list(&iface->proto_ip, cur);
+
+ if ((cur = tb[NOTIFY_DATA]))
+ proto_shell_parse_data(state->proto.iface, cur);
+
+ interface_update_complete(state->proto.iface);
+
+ if ((state->sm != S_SETUP_ABORT) && (state->sm != S_TEARDOWN)) {
+ if (!keep)
+ state->proto.proto_event(&state->proto, IFPEV_UP);
+ state->sm = S_IDLE;