diff options
author | Steven Barth <steven@midlink.org> | 2014-07-25 00:01:50 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-07-25 00:01:50 +0200 |
commit | e46cbd2f89f0be8e4a2423c065cf6b2e6ebcfea3 (patch) | |
tree | e47060fe038f413767c8fd7fcfc825031d9f0283 /ubus.c | |
parent | 4156ba83483d0f1203fd17159974ae958325368c (diff) |
Only add dynamic interfaces if the underlying interface is ready
Signed-off-by: Steven Barth <steven@midlink.org>
Diffstat (limited to 'ubus.c')
-rw-r--r-- | ubus.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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: |