X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=config.c;h=49bae15dfe21599d6dc6058f2598760b429f1196;hp=f589a4bf4cfc3322e0e9648bc614d21ac156d41c;hb=72adf25cf21490aef012bb9314357f9b381934f9;hpb=266d92dd83bd5bfe520f3e2838794bf9bb827c07 diff --git a/config.c b/config.c index f589a4b..49bae15 100644 --- a/config.c +++ b/config.c @@ -71,12 +71,11 @@ config_parse_interface(struct uci_section *s, bool alias) } uci_to_blob(&b, s, &interface_attr_list); - iface = calloc(1, sizeof(*iface)); + + iface = interface_alloc(s->e.name, b.head); if (!iface) return; - interface_init(iface, s->e.name, b.head, false); - if (iface->proto_handler && iface->proto_handler->config_params) uci_to_blob(&b, s, iface->proto_handler->config_params);