Remove getmsg() on Solaris and use read() like everyone else.
authorDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 13 Dec 2011 23:30:38 +0000 (23:30 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 13 Dec 2011 23:30:38 +0000 (23:30 +0000)
commit4b79633df8e1ad572afd026a31d89ad7d3141806
treefd4b19164d979af9001c318358442aff12d1b290
parent5f11f09bd0adb5513728ff89f592a7b766f5e061
Remove getmsg() on Solaris and use read() like everyone else.

As long as we put the file descriptor into "message-discard" mode with
the I_SRDOPT ioctl, it'll behave like every other OS and only return
one packet at a time even if more would fit in the buffer.

The MOREDATA flag doesn't mean what we thought it did, so getmsg() has no
efficiency advantages, and we're better off keeping it simple.

Also fix a bug introduced for script_tun mode by commit 337cf1a7.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
tun.c