An interfaces referring to a static interface is not getting active when doing a network
reload or ifup.
The problem is triggered by alias_set_device which is not clearing the pending update
(mostly a null device due to the previous down event) when the same device is set as the
current device via alias_notify_device.
As a result alias_set_device_state when called will overwrite the device with an invalid
pending device meaning the interface will not be set available anymore and thus will
stay down.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
static void alias_set_device(struct alias_device *alias, struct device *dev)
{
- if (dev == alias->dep.dev)
+ if (dev == alias->dep.dev) {
+ if (alias->update) {
+ device_remove_user(&alias->new_dep);
+ alias->update = false;
+ if (dev)
+ device_set_present(&alias->dev, true);
+ }
return;
+ }
device_set_present(&alias->dev, false);
device_remove_user(&alias->new_dep);