X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=interface.c;h=ddbdca9122a9ce1e1b00b3a70d442cb53d4260b8;hb=7a3cfc37189aab8991cfaa7986f221d61127599d;hp=96f8e6d70029a74e89064a08ae219c973ab2c72f;hpb=f8cf10f2623cbda18e429cc122952859d3e323a5;p=project%2Fnetifd.git diff --git a/interface.c b/interface.c index 96f8e6d..ddbdca9 100644 --- a/interface.c +++ b/interface.c @@ -63,12 +63,12 @@ static const struct blobmsg_policy iface_attrs[IFACE_ATTR_MAX] = { [IFACE_ATTR_IP6CLASS] = { .name = "ip6class", .type = BLOBMSG_TYPE_ARRAY }, }; -static const union config_param_info iface_attr_info[IFACE_ATTR_MAX] = { +static const struct uci_blob_param_info iface_attr_info[IFACE_ATTR_MAX] = { [IFACE_ATTR_DNS] = { .type = BLOBMSG_TYPE_STRING }, [IFACE_ATTR_IP6CLASS] = { .type = BLOBMSG_TYPE_STRING }, }; -const struct config_param_list interface_attr_list = { +const struct uci_blob_param_list interface_attr_list = { .n_params = IFACE_ATTR_MAX, .params = iface_attrs, .info = iface_attr_info, @@ -675,6 +675,9 @@ interface_set_main_dev(struct interface *iface, struct device *dev) interface_set_l3_dev(iface, dev); device_add_user(&iface->main_dev, dev); + if (!dev) + return; + if (claimed) device_claim(&iface->l3_dev); @@ -833,8 +836,8 @@ interface_change_config(struct interface *if_old, struct interface *if_new) if (!if_old->proto_handler->config_params) D(INTERFACE, "No config parameters for interface '%s'\n", if_old->name); - else if (!config_check_equal(if_old->config, if_new->config, - if_old->proto_handler->config_params)) + else if (!uci_blob_check_equal(if_old->config, if_new->config, + if_old->proto_handler->config_params)) reload = true; #define UPDATE(field, __var) ({ \