X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/cda884c6f26f18d1975a4af81536dd7c58d810c1..6d18bf1a12bfc8c49579f818c7b9c43301a2817d:/src/res.c diff --git a/src/res.c b/src/res.c index 8d0d94f..08b2c25 100644 --- a/src/res.c +++ b/src/res.c @@ -31,8 +31,7 @@ #include "ircd.h" #include "res.h" #include "reslib.h" -#include "irc_string.h" -#include "sprintf_irc.h" +#include "match.h" #include "numeric.h" #include "client.h" /* SNO_* */ @@ -100,11 +99,6 @@ static int proc_answer(struct reslist *request, HEADER * header, char *, char *) static struct reslist *find_id(int id); static struct DNSReply *make_dnsreply(struct reslist *request); -extern struct rb_sockaddr_storage irc_nsaddr_list[IRCD_MAXNS]; -extern int irc_nscount; -extern char irc_domain[HOSTLEN + 1]; - - /* * int * res_ourserver(inp) @@ -407,7 +401,7 @@ static void do_query_name(struct DNSQuery *query, const char *name, struct resli { char host_name[HOSTLEN + 1]; - strlcpy(host_name, name, HOSTLEN + 1); + rb_strlcpy(host_name, name, HOSTLEN + 1); add_local_domain(host_name, HOSTLEN); if (request == NULL) @@ -418,7 +412,7 @@ static void do_query_name(struct DNSQuery *query, const char *name, struct resli request->state = REQ_A; } - strlcpy(request->queryname, host_name, sizeof(request->queryname)); + rb_strlcpy(request->queryname, host_name, sizeof(request->queryname)); request->type = type; query_name(request); } @@ -681,7 +675,7 @@ static int proc_answer(struct reslist *request, HEADER * header, char *buf, char else if (n == 0) return (0); /* no more answers left */ - strlcpy(request->name, hostbuf, HOSTLEN + 1); + rb_strlcpy(request->name, hostbuf, HOSTLEN + 1); return (1); break; @@ -864,9 +858,9 @@ void report_dns_servers(struct Client *source_p) for (i = 0; i < irc_nscount; i++) { - if (!inetntop_sock((struct sockaddr *)&(irc_nsaddr_list[i]), + if (!rb_inet_ntop_sock((struct sockaddr *)&(irc_nsaddr_list[i]), ipaddr, sizeof ipaddr)) - strlcpy(ipaddr, "?", sizeof ipaddr); + rb_strlcpy(ipaddr, "?", sizeof ipaddr); sendto_one_numeric(source_p, RPL_STATSDEBUG, "A %s", ipaddr); }