diff --git a/Changes b/Changes index d14030f65..474581162 100644 --- a/Changes +++ b/Changes @@ -1302,3 +1302,5 @@ seen. gmtime warning still there - Removed some SOCKS scanner debug code that was forgotten - Finally REALLY fixed the scanner (note to Stskeeps: bcmp returns 0 when there IS a match) - Added OpenIRC-CA in .SICI +- Fixed a openssl+ipv6 bug, pointed out by Aragon .. This probably breaks some other crap, but what + the heck.. diff --git a/src/s_bsd.c b/src/s_bsd.c index 968d0ad04..fdd9b1aca 100644 --- a/src/s_bsd.c +++ b/src/s_bsd.c @@ -1300,20 +1300,12 @@ static int read_packet(aClient *cptr, fd_set *rfd) !(IsPerson(cptr) && DBufLength(&cptr->recvQ) > 6090)) { SET_ERRNO(0); -#ifdef INET6 - length = recvfrom(cptr->fd, readbuf, sizeof(readbuf), 0, 0, 0); -#else -#ifndef USE_SSL - length = recv(cptr->fd, readbuf, sizeof(readbuf), 0); -#else +#ifdef USE_SSL if (cptr->flags & FLAGS_SSL) length = SSL_read((SSL *)cptr->ssl, readbuf, sizeof(readbuf)); else +#endif length = recv(cptr->fd, readbuf, sizeof(readbuf), 0); - -#endif -#endif - cptr->lasttime = now; if (cptr->lasttime > cptr->since) cptr->since = cptr->lasttime; @@ -1471,15 +1463,12 @@ static int read_packet(aClient *cptr) { errno = 0; -#ifndef USE_SSL - length = recv(cptr->fd, readbuf, sizeof(readbuf), 0); -#else +#ifdef USE_SSL if (cptr->flags & FLAGS_SSL) length = SSL_read((SSL *)cptr->ssl, readbuf, sizeof(readbuf)); else - length = recv(cptr->fd, readbuf, sizeof(readbuf), 0); - #endif + length = recv(cptr->fd, readbuf, sizeof(readbuf), 0); cptr->lasttime = now; if (cptr->lasttime > cptr->since) cptr->since = cptr->lasttime; diff --git a/src/socket.c b/src/socket.c index 04f2eae6d..bea18c016 100644 --- a/src/socket.c +++ b/src/socket.c @@ -86,14 +86,8 @@ int deliver_it(aClient *cptr, char *str, int len) if (cptr->flags & FLAGS_SSL) retval = SSL_write((SSL *)cptr->ssl, str, len); else +#endif retval = send(cptr->fd, str, len, 0); -#else -#ifndef INET6 - retval = send(cptr->fd, str, len, 0); -#else - retval = sendto(cptr->fd, str, len, 0, 0, 0); -#endif -#endif /* ** Convert WOULDBLOCK to a return of "0 bytes moved". This ** should occur only if socket was non-blocking. Note, that