Skip to content
Permalink
Browse files

config: Prioritize ifname resolving via ubus over ifname/networkid at…

…tributes

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
  • Loading branch information...
dedeckeh committed Nov 27, 2015
1 parent 32b977a commit 045a6202903084c7053924f2cb40a95669fb139c
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/config.c
@@ -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;

0 comments on commit 045a620

Please sign in to comment.
You can’t perform that action at this time.