X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=dns.c;h=89cd4ce5a76fc4ebd736784cf6d6fcbe4180bf0d;hb=000402bc86dacf2ffe64cdd376145fa8c7294e34;hp=c5323e5e93c449af5ff38913dc8ec5c6a6a18687;hpb=5bdbcd785b0a08e866631a6a062ea9ced1f6dce8;p=oweals%2Fmdnsd.git diff --git a/dns.c b/dns.c index c5323e5..89cd4ce 100644 --- a/dns.c +++ b/dns.c @@ -39,6 +39,7 @@ #include "interface.h" static char name_buffer[MAX_NAME_LEN + 1]; +static char dns_buffer[MAX_NAME_LEN]; static struct blob_buf ans_buf; const char* @@ -76,7 +77,7 @@ dns_send_question(struct interface *iface, const char *question, int type, int u .iov_len = sizeof(h), }, { - .iov_base = name_buffer, + .iov_base = dns_buffer, }, { .iov_base = &q, @@ -89,7 +90,7 @@ dns_send_question(struct interface *iface, const char *question, int type, int u q.class = cpu_to_be16(((unicast) ? (CLASS_UNICAST) : (0)) | 1); q.type = cpu_to_be16(type); - len = dn_comp(question, (void *) name_buffer, sizeof(name_buffer), NULL, NULL); + len = dn_comp(question, (void *) dns_buffer, sizeof(dns_buffer), NULL, NULL); if (len < 1) return;