Fix last commit

This commit is contained in:
angt
2015-11-15 18:38:43 +01:00
parent 5865e61fd2
commit 4944e76f97

View File

@@ -750,7 +750,6 @@ int main (int argc, char **argv)
tunw.size = 0;
fd_set rfds, wfds;
FD_ZERO(&rfds);
FD_ZERO(&wfds);
@@ -758,7 +757,7 @@ int main (int argc, char **argv)
FD_SET(tun.fd, &rfds);
FD_SET(sock.fd, &rfds);
if (select(2, &rfds, &wfds, NULL, NULL)==-1 && errno!=EINTR) {
if (select(sock.fd+1, &rfds, &wfds, NULL, NULL)==-1 && errno!=EINTR) {
perror("select");
return 1;
}