summaryrefslogtreecommitdiffhomepage
path: root/ubus.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-06-13 13:33:56 +0200
committerHans Dedecker <dedeckeh@gmail.com>2017-06-17 13:40:08 +0200
commitef5f7a09a202ba6c3d2021af0b36ee32a18f680f (patch)
tree88fe92f00b9a0ede7d4ead48809d3a2d1cd29370 /ubus.c
parent5a68693037a471812831a605cc23186b0eeacbe8 (diff)
ubus: remove superfluous error check in netifd_add_dynamic
Check for main device and main device having default config for a dynamic interface was orginally added in commit 266d92dd83bd5bfe520f3e2838794bf9bb827c07 with as purpose to set the device config. The latter was later removed in commit 4bf89afc22b43d5bd155d32d3998348a77179c1a which makes the device checks superfluous. Also not all interfaces have a main device (eg tunnel interfaces) resulting into netifd_add_dynamic returning an error code when such interfaces are added. As an example 6rd interfaces dynamically added by the DHCP script the log messages are cluttered with the trace 'wan (7803): Command failed: Unknown error' after each DHCP renew. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'ubus.c')
-rw-r--r--ubus.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/ubus.c b/ubus.c
index 6f7c3e1..bf72672 100644
--- a/ubus.c
+++ b/ubus.c
@@ -129,7 +129,6 @@ netifd_add_dynamic(struct ubus_context *ctx, struct ubus_object *obj,
struct blob_attr *tb[__DI_MAX];
struct interface *iface;
struct blob_attr *config;
- struct device *dev;
blobmsg_parse(dynamic_policy, __DI_MAX, tb, blob_data(msg), blob_len(msg));
@@ -157,10 +156,6 @@ netifd_add_dynamic(struct ubus_context *ctx, struct ubus_object *obj,
// Set interface as dynamic
interface_set_dynamic(iface);
- dev = iface->main_dev.dev;
- if (!dev || !dev->default_config)
- return UBUS_STATUS_UNKNOWN_ERROR;
-
return UBUS_STATUS_OK;
error: