aboutsummaryrefslogtreecommitdiff
path: root/lib/netdev-provider.h
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2010-10-27 15:29:16 -0700
committerJesse Gross <jesse@nicira.com>2010-10-28 11:19:29 -0700
commit85da620e9788b473797b95212b916327974e6942 (patch)
treea38f2de7a3ff589f6cb0275effe13ea803b44f22 /lib/netdev-provider.h
parent371e4acc87f79bcf5a28420a61e4c35291727e0f (diff)
netdev: Fix carrier status for down interfaces.
Currently netdev_get_carrier() returns both a carrier status and an error code. However, usage of the error code was inconsistent: most callers either ignored it or didn't perform their task if an error occured, which prevented bond rebalancing. This makes the handling consistent by translating an error into a down status in the netdev library. Bug #3959
Diffstat (limited to 'lib/netdev-provider.h')
-rw-r--r--lib/netdev-provider.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h
index d4ff6200..170136d4 100644
--- a/lib/netdev-provider.h
+++ b/lib/netdev-provider.h
@@ -259,7 +259,11 @@ struct netdev_class {
int (*get_ifindex)(const struct netdev *netdev);
/* Sets 'carrier' to true if carrier is active (link light is on) on
- * 'netdev'. */
+ * 'netdev'.
+ *
+ * May be null if device does not provide carrier status (will be always
+ * up as long as device is up).
+ */
int (*get_carrier)(const struct netdev *netdev, bool *carrier);
/* Retrieves current device stats for 'netdev' into 'stats'.