mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
import of dnsmasq-2.33.tar.gz
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
static struct frec *frec_list = NULL;
|
||||
|
||||
static struct frec *get_new_frec(time_t now);
|
||||
static struct frec *get_new_frec(struct daemon *daemon, time_t now);
|
||||
static struct frec *lookup_frec(unsigned short id);
|
||||
static struct frec *lookup_frec_by_sender(unsigned short id,
|
||||
union mysockaddr *addr,
|
||||
@@ -232,7 +232,7 @@ static void forward_query(struct daemon *daemon, int udpfd, union mysockaddr *ud
|
||||
if (gotname)
|
||||
flags = search_servers(daemon, now, &addrp, gotname, daemon->namebuff, &type, &domain);
|
||||
|
||||
if (!flags && !(forward = get_new_frec(now)))
|
||||
if (!flags && !(forward = get_new_frec(daemon, now)))
|
||||
/* table full - server failure. */
|
||||
flags = F_NEG;
|
||||
|
||||
@@ -837,7 +837,7 @@ unsigned char *tcp_request(struct daemon *daemon, int confd, time_t now,
|
||||
}
|
||||
}
|
||||
|
||||
static struct frec *get_new_frec(time_t now)
|
||||
static struct frec *get_new_frec(struct daemon *daemon, time_t now)
|
||||
{
|
||||
struct frec *f = frec_list, *oldest = NULL;
|
||||
time_t oldtime = now;
|
||||
@@ -870,7 +870,7 @@ static struct frec *get_new_frec(time_t now)
|
||||
return oldest;
|
||||
}
|
||||
|
||||
if (count > FTABSIZ)
|
||||
if (count > daemon->ftabsize)
|
||||
{ /* limit logging rate so syslog isn't DOSed either */
|
||||
if (!warntime || difftime(now, warntime) > LOGRATE)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user