diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-11 12:32:54 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-09-11 12:32:54 +0200 |
commit | f505119b07b89ad23f4264e77b0bf0f0c0400399 (patch) | |
tree | 4a1838aabaf4e9788cacddfa1390083b2a2a2169 /interface.c | |
parent | bbfa8c18c8ae086b6fd941e950c466f25c134c17 (diff) |
do not attempt to get an interface if PROTO_FLAG_NODEV is set
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/interface.c b/interface.c index 8c1c006..acfe8b1 100644 --- a/interface.c +++ b/interface.c @@ -234,7 +234,8 @@ interface_alloc(const char *name, struct blob_attr *attr) proto_attach_interface(iface, proto_name); - if ((cur = tb[IFACE_ATTR_IFNAME])) { + if (!(iface->proto_handler->flags & PROTO_FLAG_NODEV) && + (cur = tb[IFACE_ATTR_IFNAME])) { dev = device_get(blobmsg_data(cur), true); if (dev) device_add_user(&iface->main_dev, dev); |