git ssb

0+

cel / sslh



Commit d02ffcd15482a7feaed11d9109ae578eda3734dd

Fixed bug in sslh-select: if socket dropped while defered_data was present, sslh-select would crash.

Yves Rutschle committed on 7/19/2013, 10:45:33 PM
Parent: f842e2e081c25dfa73c48f8359b388e2530c9f8a

Files changed

ChangeLogchanged
sslh-select.cchanged
ChangeLogView
@@ -1,4 +1,8 @@
1+vNEXT:
2+ Fixed bug in sslh-select: if socket dropped while
3+ defered_data was present, sslh-select would crash.
4+
15 v1.14: 21DEC2012
26 Corrected OpenVPN probe to support pre-shared secret
37 mode (OpenVPN port-sharing code is... wrong). Thanks
48 to Kai Ellinger for help in investigating and
sslh-select.cView
@@ -260,15 +260,16 @@
260260 if (cnx[i].state == ST_PROBING) num_probing--;
261261 tidy_connection(&cnx[i], &fds_r, &fds_w);
262262 if (verbose)
263263 fprintf(stderr, "closed slot %d\n", i);
264+ } else {
265+ /* If no defered data is left, stop monitoring the fd
266+ * for write, and restart monitoring the other one for reads*/
267+ if (!cnx[i].q[j].defered_data_size) {
268+ FD_CLR(cnx[i].q[j].fd, &fds_w);
269+ FD_SET(cnx[i].q[1-j].fd, &fds_r);
270+ }
264271 }
265- /* If no defered data is left, stop monitoring the fd
266- * for write, and restart monitoring the other one for reads*/
267- if (!cnx[i].q[j].defered_data_size) {
268- FD_CLR(cnx[i].q[j].fd, &fds_w);
269- FD_SET(cnx[i].q[1-j].fd, &fds_r);
270- }
271272 }
272273 }
273274 }
274275 }

Built with git-ssb-web