netdev-linux: Do not log a warning if the device is down.
authorDaniele Di Proietto <diproiettod@vmware.com>
Thu, 7 Jul 2016 01:09:12 +0000 (18:09 -0700)
committerDaniele Di Proietto <diproiettod@vmware.com>
Thu, 7 Jul 2016 01:14:25 +0000 (18:14 -0700)
commit29736cc0764b317f1130966c1b269ea4b5d3b44d
treeb546c225e1265a3cd3613b84681be168122111f8
parentcc51a9677ef86918e647703235294b74e66076e5
netdev-linux: Do not log a warning if the device is down.

In the userspace datapath we use tap devices as internal netdev.  The
datapath doesn't consider whether a device is up or down before sending
to it, and so far this hasn't been a problem.

Since Linux upstream commit 1bd4978a88ac("tun: honor IFF_UP in
tun_get_user()"), included in 4.4, writing to a tap device that is not
up sets errno to EIO.  This commit avoids printing a warning in this
case.

This fixes a failures in the system-userspace-testsuites.

Reported-by: Joe Stringer <joe@ovn.org>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@ovn.org>
lib/netdev-linux.c