Report errors and close the incoming connection if socketpair fails
for ssl connections. from ircd-ratbox (r26503) (androsyn)
This commit is contained in:
parent
ecb0b4b941
commit
77ced1e851
|
@ -552,7 +552,12 @@ accept_ssld(rb_fde_t *F, struct sockaddr *addr, struct sockaddr *laddr, struct L
|
|||
{
|
||||
ssl_ctl_t *ctl;
|
||||
rb_fde_t *xF[2];
|
||||
rb_socketpair(AF_UNIX, SOCK_STREAM, 0, &xF[0], &xF[1], "Incoming ssld Connection");
|
||||
if(rb_socketpair(AF_UNIX, SOCK_STREAM, 0, &xF[0], &xF[1], "Incoming ssld Connection") == -1)
|
||||
{
|
||||
ilog_error("creating SSL/TLS socket pairs");
|
||||
rb_close(F);
|
||||
return;
|
||||
}
|
||||
ctl = start_ssld_accept(F, xF[1], rb_get_fd(xF[0])); /* this will close F for us */
|
||||
add_connection(listener, xF[0], addr, laddr, ctl);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue