Use getmsg() intead of read() on Solaris tun device
authorKazuyoshi Aizawa <admin2@whiteboard.ne.jp>
Wed, 23 Nov 2011 13:25:36 +0000 (13:25 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 23 Nov 2011 13:29:40 +0000 (13:29 +0000)
commit4bed2c628edaea0ba1555ba8e49d305776402d4c
tree2cdfc65d981b2888cf15777d299256e0146317fd
parent4887e3fa703793c43226ae5cde0661ec59edd5c2
Use getmsg() intead of read() on Solaris tun device

On Solaris, a read from the tun device can return parts of multiple
packets, and there's no safe way to tell where one ends and the next
starts. Use getmsg() instead, which will only return one packet.

[dwmw2: Mangled a little to cope with script_tun mode and simplify loop]
Signed-off-by: Kazuyoshi Aizawa <admin2@whiteboard.ne.jp>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
tun.c
www/changelog.xml