Bugzilla – Bug 2785
TapBridge::ReceiveFromBridgedDevice(): Write error on Linux >= 4.4
Last modified: 2017-10-03 19:46:17 UTC
Created attachment 2925 [details] tap-bridge: Ignore EIO on write 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. Before 4.4 it did no result in error, packets written to an uninitialized tap device were silently dropped. https://github.com/torvalds/linux/commit/1bd4978a88ac Due to this change, ns-3 with TapBridge randomly crashes on startup when it tries to write to a device which is not yet UP with the following error: aborted. cond="bytesWritten != p->GetSize ()", msg="TapBridge::ReceiveFromBridgedDevice(): Write error.", file=../src/tap-bridge/model/tap-bridge.cc, line=994 Similar problem: https://mail.openvswitch.org/pipermail/ovs-dev/2016-June/316261.html The attached patch fixes the problem by ignoring EIO on write to tap interface. It also adds initialization for previously uninitialized m_linkUp variable.
Piotr, should we be ignoring the error (is it masking a real failure to use the device)?