X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/d3455e2c7e2f9040e1b7628d9cf52b26a24dcefc..7bab07d4d30245bf5ba272b236dc7b1c1e309c4d:/src/s_auth.c?ds=sidebyside diff --git a/src/s_auth.c b/src/s_auth.c index 0fabfb8..21236b4 100644 --- a/src/s_auth.c +++ b/src/s_auth.c @@ -199,7 +199,7 @@ auth_dns_callback(void *vptr, struct DNSReply *reply) good = 0; } } -#ifdef IPV6 +#ifdef RB_IPV6 else if(auth->client->localClient->ip.ss_family == AF_INET6) { struct sockaddr_in6 *ip, *ip_fwd; @@ -240,7 +240,7 @@ auth_dns_callback(void *vptr, struct DNSReply *reply) static void auth_error(struct AuthRequest *auth) { - ++ServerStats->is_abad; + ++ServerStats.is_abad; rb_close(auth->F); auth->F = NULL; @@ -274,7 +274,7 @@ start_auth_query(struct AuthRequest *auth) if((F = rb_socket(family, SOCK_STREAM, 0, "ident")) == NULL) { ilog_error("creating auth stream socket"); - ++ServerStats->is_abad; + ++ServerStats.is_abad; return 0; } @@ -304,7 +304,7 @@ start_auth_query(struct AuthRequest *auth) (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; @@ -313,13 +313,13 @@ start_auth_query(struct AuthRequest *auth) ((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); @@ -445,7 +445,7 @@ timeout_auth_queries_event(void *notused) if(IsDoingAuth(auth)) { ClearAuth(auth); - ++ServerStats->is_abad; + ++ServerStats.is_abad; sendheader(auth->client, REPORT_FAIL_ID); auth->client->localClient->auth_request = NULL; } @@ -575,14 +575,14 @@ read_auth_reply(rb_fde_t *F, void *data) 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); }