summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-10-05 21:41:52 +0200
committerFelix Fietkau <nbd@openwrt.org>2013-10-19 17:31:55 +0200
commit6843870670b8a68c98528faf638c6b3938cab55d (patch)
treeb63d960f42a5354909fc48f26691993ad7176ec0 /config.c
parent65963f0ad2207b55dc7715015839b59b58855a67 (diff)
downloadnetifd-6843870670b8a68c98528faf638c6b3938cab55d.tar.gz
interface: rework code to get rid of arbitrary IFNAMSIZ limitation for interface names
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'config.c')
-rw-r--r--config.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/config.c b/config.c
index 682db54..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);