add/skip packet information on tap send/recv
authorGiuseppe Lettieri <g.lettieri@iet.unipi.it>
Wed, 26 Sep 2012 17:09:04 +0000 (19:09 +0200)
committerGiuseppe Lettieri <g.lettieri@iet.unipi.it>
Wed, 26 Sep 2012 17:09:04 +0000 (19:09 +0200)
commit8dbbeaa2a927b5a0faca32e9bbc4236746adbb60
tree667eeabdc57242de874acf27fb4e517518c23510
parentbcb67bd81dfa52acc51040a9bf358a530c3fac2b
add/skip packet information on tap send/recv

Unless the IFF_NO_PI flag is set when the tap is created,
the kernel assumes that each packet sent to or received from
a tap fd starts with 4 bytes of packet information.

We previously did not care about this 4 extra bytes, but external
controllers are confused by them (the internal ovs-switch logic was
confused as well, but it defaulted to hub behaviour and the bug
was thus hidden).

Unfortunately, fd_tuntap does not allow us to set IFF_NO_IP, so
we have to manually skip/add the 4 bytes on recv/send.
lib/netdev-pltap.c