summaryrefslogtreecommitdiffhomepage
path: root/ubus.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 /ubus.c
parent65963f0ad2207b55dc7715015839b59b58855a67 (diff)
interface: rework code to get rid of arbitrary IFNAMSIZ limitation for interface names
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'ubus.c')
-rw-r--r--ubus.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ubus.c b/ubus.c
index cfdfcf3..31a83a9 100644
--- a/ubus.c
+++ b/ubus.c
@@ -135,11 +135,10 @@ netifd_add_dynamic(struct ubus_context *ctx, struct ubus_object *obj,
const char *name = blobmsg_get_string(tb[DI_NAME]);
- iface = calloc(1, sizeof(*iface));
+ iface = interface_alloc(name, msg);
if (!iface)
return UBUS_STATUS_UNKNOWN_ERROR;
- interface_init(iface, name, msg);
interface_set_dynamic(iface);
iface->device_config = true;