Quit when there are too many consecutive errors on the tun/tap device.
authorGuus Sliepen <guus@tinc-vpn.org>
Tue, 2 Nov 2010 13:18:35 +0000 (14:18 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 2 Nov 2010 13:18:35 +0000 (14:18 +0100)
commita91bf2dfcd0f5857905e59da7d944654e0875503
tree510def1830ff1c107e3381ede10208c41c3f15cb
parentaca70cd3c3fe787e62c618849e43f67b3870ac20
Quit when there are too many consecutive errors on the tun/tap device.

Although transient errors sometimes happen on the tun/tap device (for example,
if the kernel is temporarily out of buffer space), there are situations where
the tun/tap device becomes permanently broken. Instead of endlessly spamming
the syslog, we now sleep an increasing amount of time between consecutive read
errors, and if reads still fail after 10 attempts (approximately 3 seconds),
tinc will quit.
src/net.c