X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=config.c;h=49bae15dfe21599d6dc6058f2598760b429f1196;hp=8db2b59b15514d1e3367c36781d263e28de1171e;hb=f8d894ad5974c29471cfef6679a819ab5a7e4ef8;hpb=d095bf24cf7879150d008c23998676bfedebbde6 diff --git a/config.c b/config.c index 8db2b59..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); - if (iface->proto_handler && iface->proto_handler->config_params) uci_to_blob(&b, s, iface->proto_handler->config_params); @@ -166,6 +165,8 @@ config_init_devices(void) devtype = &bridge_device_type; else if (!strcmp(type, "tunnel")) devtype = &tunnel_device_type; + else if (!strcmp(type, "macvlan")) + devtype = &macvlan_device_type; } if (!devtype)