[PATCH] Fix identd connections on FreeBSD.

FreeBSD is apparently stricter than Linux with the address length parameter to the connect system call. The code was using the total length of the buffer (big enough for either an IPv4 or IPv6 address) instead of the exact length depending on the kind of address, which caused FreeBSD to return an error immediately, even though an IPv4 address can still fit in the buffer for an IPv6 address. Fixed by re-using the address length calculated earlier when binding the socket. This was spotted thanks to a user who reported that identd wasn't working for them. --- src/s_auth.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/s_auth.c b/src/s_auth.c index 6cf4d81..92c0af7 100644 --- a/src/s_auth.c +++ b/src/s_auth.c @@ -134,7 +134,7 @@ void start_auth(aClient *cptr) } if (connect(cptr->authfd, &sock.sa, - sizeof(sock)) == -1 && errno != EINPROGRESS) + locallen) == -1 && errno != EINPROGRESS) { ircstp->is_abad++; /* No error report from this... */ -- 1.7.7.3
participants (1)
-
Ned T. Crigler