This conforms with the interface described in netdev-provider.h.

Found when experimenting with native tunneling and dummy devices.

Signed-off-by: Ben Pfaff <b...@nicira.com>
---
 lib/netdev-dummy.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c
index 33d0876..4d1ef8a 100644
--- a/lib/netdev-dummy.c
+++ b/lib/netdev-dummy.c
@@ -725,7 +725,8 @@ netdev_dummy_get_in4(const struct netdev *netdev_,
     *address = netdev->address;
     *netmask = netdev->netmask;
     ovs_mutex_unlock(&netdev->mutex);
-    return 0;
+
+    return address->s_addr ? 0 : EADDRNOTAVAIL;
 }
 
 static int
-- 
2.1.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to