mirror of
https://github.com/moparisthebest/sslh
synced 2025-02-16 06:50:14 -05:00
Fixed bug in sslh-select: if socket dropped while defered_data was present, sslh-select would crash.
This commit is contained in:
parent
f842e2e081
commit
d02ffcd154
@ -1,3 +1,7 @@
|
|||||||
|
vNEXT:
|
||||||
|
Fixed bug in sslh-select: if socket dropped while
|
||||||
|
defered_data was present, sslh-select would crash.
|
||||||
|
|
||||||
v1.14: 21DEC2012
|
v1.14: 21DEC2012
|
||||||
Corrected OpenVPN probe to support pre-shared secret
|
Corrected OpenVPN probe to support pre-shared secret
|
||||||
mode (OpenVPN port-sharing code is... wrong). Thanks
|
mode (OpenVPN port-sharing code is... wrong). Thanks
|
||||||
|
@ -261,12 +261,13 @@ void main_loop(int listen_sockets[], int num_addr_listen)
|
|||||||
tidy_connection(&cnx[i], &fds_r, &fds_w);
|
tidy_connection(&cnx[i], &fds_r, &fds_w);
|
||||||
if (verbose)
|
if (verbose)
|
||||||
fprintf(stderr, "closed slot %d\n", i);
|
fprintf(stderr, "closed slot %d\n", i);
|
||||||
}
|
} else {
|
||||||
/* If no defered data is left, stop monitoring the fd
|
/* If no defered data is left, stop monitoring the fd
|
||||||
* for write, and restart monitoring the other one for reads*/
|
* for write, and restart monitoring the other one for reads*/
|
||||||
if (!cnx[i].q[j].defered_data_size) {
|
if (!cnx[i].q[j].defered_data_size) {
|
||||||
FD_CLR(cnx[i].q[j].fd, &fds_w);
|
FD_CLR(cnx[i].q[j].fd, &fds_w);
|
||||||
FD_SET(cnx[i].q[1-j].fd, &fds_r);
|
FD_SET(cnx[i].q[1-j].fd, &fds_r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user