From: Steven Barth Date: Thu, 24 Jul 2014 22:01:50 +0000 (+0200) Subject: Only add dynamic interfaces if the underlying interface is ready X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e46cbd2f89f0be8e4a2423c065cf6b2e6ebcfea3;p=oweals%2Fnetifd.git Only add dynamic interfaces if the underlying interface is ready Signed-off-by: Steven Barth --- diff --git a/ubus.c b/ubus.c index 9a573c6..6c42aa1 100644 --- a/ubus.c +++ b/ubus.c @@ -162,6 +162,10 @@ netifd_add_dynamic(struct ubus_context *ctx, struct ubus_object *obj, return UBUS_STATUS_UNKNOWN_ERROR; device_set_config(dev, dev->type, msg); + + if (iface->state != IFS_SETUP && iface->state != IFS_UP) + vlist_delete(&interfaces, &iface->node); + return UBUS_STATUS_OK; error: