summaryrefslogtreecommitdiffhomepage
path: root/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'device.c')
-rw-r--r--device.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/device.c b/device.c
index 5e3a741..e484c09 100644
--- a/device.c
+++ b/device.c
@@ -572,13 +572,14 @@ device_get(const char *name, int create)
{
struct device *dev;
- if (strchr(name, '.'))
+ dev = avl_find_element(&devices, name, dev, avl);
+
+ if (!dev && strchr(name, '.'))
return get_vlan_device_chain(name, create);
if (name[0] == '@')
return device_alias_get(name + 1);
- dev = avl_find_element(&devices, name, dev, avl);
if (dev) {
if (create > 1 && !dev->external) {
system_if_apply_settings(dev, &dev->settings, dev->settings.flags);