diff --git a/src/forward.c b/src/forward.c index e60cfdf..31f0769 100644 --- a/src/forward.c +++ b/src/forward.c @@ -670,6 +670,7 @@ int fast_retry(time_t now) return ret; } +#if defined(HAVE_IPSET) || defined(HAVE_NFTSET) static struct ipsets *domain_find_sets(struct ipsets *setlist, const char *domain) { /* Similar algorithm to search_servers. */ struct ipsets *ipset_pos, *ret = NULL; @@ -690,6 +691,7 @@ static struct ipsets *domain_find_sets(struct ipsets *setlist, const char *domai return ret; } +#endif static size_t process_reply(struct dns_header *header, time_t now, struct server *server, size_t n, int check_rebind, int no_cache, int cache_secure, int bogusanswer, int ad_reqd, int do_bit, int added_pheader, diff --git a/src/tftp.c b/src/tftp.c index 0996ef2..6ed41bc 100644 --- a/src/tftp.c +++ b/src/tftp.c @@ -362,10 +362,10 @@ void tftp_request(struct listener *listen, time_t now) p = packet + 2; end = packet + len; - if (ntohs(*((unsigned short *)packet)) != OP_RRQ || - !(filename = next(&p, end)) || + if (!(filename = next(&p, end)) || !(mode = next(&p, end)) || - (strcasecmp(mode, "octet") != 0 && strcasecmp(mode, "netascii") != 0)) + (strcasecmp(mode, "octet") != 0 && strcasecmp(mode, "netascii") != 0) || + ntohs(*((unsigned short *)packet)) != OP_RRQ) { if (!filename) len = tftp_err(ERR_ILL, packet, _("empty filename in request from %s"), daemon->addrbuff, NULL);