mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Don't complain if 0 bytes are written to the tun device, simply
do nothing.
This commit is contained in:
parent
a42377eaa1
commit
3145c58d33
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49116
@ -590,7 +590,10 @@ tunwrite(dev, uio, flag)
|
||||
|
||||
TUNDEBUG("%s%d: tunwrite\n", ifp->if_name, ifp->if_unit);
|
||||
|
||||
if (uio->uio_resid <= 0 || uio->uio_resid > TUNMRU) {
|
||||
if (uio->uio_resid == 0)
|
||||
return 0;
|
||||
|
||||
if (uio->uio_resid < 0 || uio->uio_resid > TUNMRU) {
|
||||
TUNDEBUG("%s%d: len=%d!\n", ifp->if_name, ifp->if_unit,
|
||||
uio->uio_resid);
|
||||
return EIO;
|
||||
|
Loading…
Reference in New Issue
Block a user