diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2016-06-06 14:58:32 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-06-06 15:42:01 +0200 |
commit | ca2f99575937b183618e425a73b45bcc277b5541 (patch) | |
tree | 4f57fbdb9549992bc760596db0c39a461a57648f /device.h | |
parent | 29521f9a232f039318fd8525c410b3127836626f (diff) |
device: Fix dotted vlan interface staying down
Using the config below a dotted vlan interface stays down as get_vlan_device
does not find the device due to the aliased device stacked on top of the base
device.
As all devices; aliased devices being the exception; are in the device list
use device_find to find the device when setting the link state
config interface 'test'
option proto 'static'
option ipaddr '192.168.2.1'
option netmask '255.255.255.0'
config interface 'test2'
option ifname '@test.1'
option proto 'dhcp'
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'device.h')
-rw-r--r-- | device.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -241,7 +241,8 @@ void device_set_default_ps(bool state); void device_init_virtual(struct device *dev, const struct device_type *type, const char *name); int device_init(struct device *iface, const struct device_type *type, const char *ifname); -void device_cleanup(struct device *iface); +void device_cleanup(struct device *dev); +struct device *device_find(const char *name); struct device *device_get(const char *name, int create); void device_add_user(struct device_user *dep, struct device *iface); void device_remove_user(struct device_user *dep); |