]> git.proxmox.com Git - ovs.git/blobdiff - lib/netdev-linux.c
netdev: Make netdev_get_devices() take a reference to each netdev.
[ovs.git] / lib / netdev-linux.c
index ba0d8633c3cc47dd61cd1e88f88c8ba3a6230d9b..5bbaf632f26d38f4172660a2c57fd7ad50ae215a 100644 (file)
@@ -555,6 +555,7 @@ netdev_linux_cache_cb(const struct rtnetlink_link_change *change,
 
             get_flags(&dev->up, &flags);
             netdev_linux_changed(dev, flags, 0);
+            netdev_close(netdev);
         }
         shash_destroy(&device_shash);
     }
@@ -1180,6 +1181,7 @@ netdev_linux_miimon_run(void)
         bool miimon;
 
         if (dev->miimon_interval <= 0 || !timer_expired(&dev->miimon_timer)) {
+            netdev_close(netdev);
             continue;
         }
 
@@ -1190,6 +1192,7 @@ netdev_linux_miimon_run(void)
         }
 
         timer_set_duration(&dev->miimon_timer, dev->miimon_interval);
+        netdev_close(netdev);
     }
 
     shash_destroy(&device_shash);
@@ -1210,6 +1213,7 @@ netdev_linux_miimon_wait(void)
         if (dev->miimon_interval > 0) {
             timer_wait(&dev->miimon_timer);
         }
+        netdev_close(netdev);
     }
     shash_destroy(&device_shash);
 }