#include "client.h"
#include "common.h"
#include "irc_string.h"
-#include "sprintf_irc.h"
#include "ircd.h"
#include "numeric.h"
#include "packet.h"
good = 0;
}
}
-#ifdef IPV6
+#ifdef RB_IPV6
else if(auth->client->localClient->ip.ss_family == AF_INET6)
{
struct sockaddr_in6 *ip, *ip_fwd;
if(good && strlen(reply->h_name) <= HOSTLEN)
{
- strlcpy(auth->client->host, reply->h_name, sizeof(auth->client->host));
+ rb_strlcpy(auth->client->host, reply->h_name, sizeof(auth->client->host));
sendheader(auth->client, REPORT_FIN_DNS);
}
else if (strlen(reply->h_name) > HOSTLEN)
static void
auth_error(struct AuthRequest *auth)
{
- ++ServerStats->is_abad;
+ ++ServerStats.is_abad;
rb_close(auth->F);
auth->F = NULL;
if((F = rb_socket(family, SOCK_STREAM, 0, "ident")) == NULL)
{
ilog_error("creating auth stream socket");
- ++ServerStats->is_abad;
+ ++ServerStats.is_abad;
return 0;
}
(struct sockaddr *) &localaddr, &locallen);
/* XXX mangle_mapped_sockaddr((struct sockaddr *)&localaddr); */
-#ifdef IPV6
+#ifdef RB_IPV6
if(localaddr.ss_family == AF_INET6)
{
((struct sockaddr_in6 *)&localaddr)->sin6_port = 0;
((struct sockaddr_in *)&localaddr)->sin_port = 0;
destaddr = auth->client->localClient->ip;
-#ifdef IPV6
+#ifdef RB_IPV6
if(localaddr.ss_family == AF_INET6)
{
- ((struct sockaddr_in6 *)&localaddr)->sin6_port = 113;
+ ((struct sockaddr_in6 *)&destaddr)->sin6_port = htons(113);
} else
#endif
- ((struct sockaddr_in *)&localaddr)->sin_port = 113;
+ ((struct sockaddr_in *)&destaddr)->sin_port = htons(113);
auth->F = F;
SetAuthConnect(auth);
if(IsDoingAuth(auth))
{
ClearAuth(auth);
- ++ServerStats->is_abad;
+ ++ServerStats.is_abad;
sendheader(auth->client, REPORT_FAIL_ID);
auth->client->localClient->auth_request = NULL;
}
if(s == NULL)
{
- ++ServerStats->is_abad;
+ ++ServerStats.is_abad;
strcpy(auth->client->username, "unknown");
sendheader(auth->client, REPORT_FAIL_ID);
}
else
{
sendheader(auth->client, REPORT_FIN_ID);
- ++ServerStats->is_asuc;
+ ++ServerStats.is_asuc;
SetGotId(auth->client);
}