diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2016-06-29 14:02:18 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2016-06-29 15:37:30 +0200 |
commit | 5df548d8edd3f9be39d409d1eeeaef99fbb27aa0 (patch) | |
tree | 8a36614c1c99e774b52fbcd45ec0c1613ae3bb93 | |
parent | 99e6dc68bbac5a57a0ebca810a9dc36e38667821 (diff) |
alias: Set alias link device status to disabled when device is removed
Fixes missing link state event propagation for an aliased device in case a new device is added
as the link state has the last known status of the old device possible resulting into
no link state change detection.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Acked-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | alias.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -61,8 +61,10 @@ static void alias_set_device(struct alias_device *alias, struct device *dev) device_set_ifindex(&alias->dev, dev->ifindex); device_set_ifname(&alias->dev, dev->ifname); device_add_user(&alias->dep, dev); - } else + } else { device_set_ifname(&alias->dev, ""); + device_set_link(&alias->dev, false); + } } static int |