diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2015-11-27 13:34:01 +0100 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2015-11-27 14:45:46 +0100 |
commit | 045a6202903084c7053924f2cb40a95669fb139c (patch) | |
tree | 387e68fe4207c920d30c295fb5cb620b9ea95154 | |
parent | 32b977a5336612a5c01f7426c4d165685fa8aca0 (diff) |
config: Prioritize ifname resolving via ubus over ifname/networkid attributes
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r-- | src/config.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/config.c b/src/config.c index 4fc8bc7..74ab3dd 100644 --- a/src/config.c +++ b/src/config.c @@ -300,11 +300,6 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr } const char *ifname = NULL; -#ifdef WITH_UBUS - if (overwrite || !iface->ifname[0]) - ifname = ubus_get_ifname(name); -#endif - if (overwrite) { if ((c = tb[IFACE_ATTR_IFNAME])) ifname = blobmsg_get_string(c); @@ -312,6 +307,11 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr ifname = blobmsg_get_string(c); } +#ifdef WITH_UBUS + if (overwrite || !iface->ifname[0]) + ifname = ubus_get_ifname(name); +#endif + if (!iface->ifname[0] && !ifname) goto err; |