Skip to content

Commit

Permalink
config: Prioritize ifname resolving via ubus over ifname/networkid at…
Browse files Browse the repository at this point in the history
…tributes

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
  • Loading branch information
dedeckeh committed Nov 27, 2015
1 parent 32b977a commit 045a620
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/config.c
Expand Up @@ -300,18 +300,18 @@ 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);
else if ((c = tb[IFACE_ATTR_NETWORKID]))
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;

Expand Down

0 comments on commit 045a620

Please sign in to comment.