diff options
Diffstat (limited to 'system-linux.c')
-rw-r--r-- | system-linux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/system-linux.c b/system-linux.c index ed69bef..4662bf8 100644 --- a/system-linux.c +++ b/system-linux.c @@ -1033,6 +1033,8 @@ system_if_apply_settings(struct device *dev, struct device_settings *s, unsigned int system_if_up(struct device *dev) { system_if_get_settings(dev, &dev->orig_settings); + /* Only keep orig settings based on what needs to be set */ + dev->orig_settings.flags &= dev->settings.flags; system_if_apply_settings(dev, &dev->settings, dev->settings.flags); return system_if_flags(dev->ifname, IFF_UP, 0); } @@ -1040,7 +1042,6 @@ int system_if_up(struct device *dev) int system_if_down(struct device *dev) { int ret = system_if_flags(dev->ifname, 0, IFF_UP); - dev->orig_settings.flags &= dev->settings.flags; system_if_apply_settings(dev, &dev->orig_settings, dev->orig_settings.flags); return ret; } |