From 65bcc44a706428dee1fb5c66582daab61e887326 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 9 Jun 2014 21:46:25 +0200 Subject: [PATCH] move rdata_buffer to cache_answer() Signed-off-by: Felix Fietkau --- cache.c | 2 ++ dns.c | 1 - dns.h | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cache.c b/cache.c index 4dcccfb..c49b0fd 100644 --- a/cache.c +++ b/cache.c @@ -227,6 +227,8 @@ cache_answer(struct interface *iface, uint8_t *base, int blen, char *name, struc void *rdata_ptr, *txt_ptr; int host_len = 0; + static char rdata_buffer[MAX_DATA_LEN + 1]; + if (!(a->class & CLASS_IN)) return; diff --git a/dns.c b/dns.c index c1c2803..4951774 100644 --- a/dns.c +++ b/dns.c @@ -39,7 +39,6 @@ #include "service.h" #include "interface.h" -char rdata_buffer[MAX_DATA_LEN + 1]; static char name_buffer[MAX_NAME_LEN + 1]; const char* diff --git a/dns.h b/dns.h index 59ba636..ba34a85 100644 --- a/dns.h +++ b/dns.h @@ -68,8 +68,6 @@ struct dns_question { struct interface; -extern char rdata_buffer[MAX_DATA_LEN + 1]; - void dns_send_question(struct interface *iface, const char *question, int type); void dns_init_answer(void); void dns_add_answer(int type, const uint8_t *rdata, uint16_t rdlength); -- 2.11.0