X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/secnet/blobdiff_plain/b2a56f7c93d221607864761c590952b9a614dc9f..7138d0c54cd2212439434d27cb2d6ea775c3039b:/tun.c diff --git a/tun.c b/tun.c index 01c0cb8..efcf6b6 100644 --- a/tun.c +++ b/tun.c @@ -48,6 +48,7 @@ static void tun_afterpoll(void *sst, struct pollfd *fds, int nfds, struct tun *st=sst; int l; + if (nfds==0) return; if (fds[0].revents&POLLERR) { printf("tun_afterpoll: hup!\n"); }