chiark / gitweb /
server/tun-slip.c, server/tripe-admin.5.in: Handle write errors.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 22 May 2010 11:40:34 +0000 (12:40 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 22 May 2010 11:44:25 +0000 (12:44 +0100)
commit898975ee8b892cadd04322dc884b3bb8d491c8f8
tree5d500e6d5f3db3de508323f0654a412db2e6bd18
parent574318e731155b6922d7b1dba1461f30ea664e9f
server/tun-slip.c, server/tripe-admin.5.in: Handle write errors.

The error handling here is a little delicate.  SLIP pipes are marked
nonblocking, so that a slow driver won't hold up the server.  We ignore
EWOULDBLOCK/EAGAIN on the grounds that a dropped packet isn't particularly
disastrous and SLIP is pretty good at resynchronizing.  Other errors
break the tunnel; we issue a warning and stop bothering to write
packets at all until the interface is released and reassigned.  Obviously
dynamic interfaces will be discarded completely; static ones might be
left broken, but at least we'll retry.

Also, add the new warning to the documentation, since write errors weren't
previously something we worried about.
server/tripe-admin.5.in
server/tun-slip.c