Blame SOURCES/dnsmasq-2.66-Log-forwarding-table-overflows.patch

cab8d5
From 0da5e8979b5e5466d0f7bb836f2716cbcf1d4589 Mon Sep 17 00:00:00 2001
cab8d5
From: Marcelo Salhab Brogliato <msbrogli@vialink.com.br>
cab8d5
Date: Fri, 31 May 2013 11:49:06 +0100
cab8d5
Subject: [PATCH 1/1] Log forwarding table overflows.
cab8d5
cab8d5
---
cab8d5
 src/forward.c |    9 +++++++++
cab8d5
 1 file changed, 9 insertions(+), 0 deletions(-)
cab8d5
cab8d5
diff --git a/src/forward.c b/src/forward.c
cab8d5
index 33a68a0..6c9f646 100644
cab8d5
--- a/src/forward.c
cab8d5
+++ b/src/forward.c
cab8d5
@@ -1205,8 +1205,17 @@ struct frec *get_new_frec(time_t now, int *wait)
cab8d5
   /* none available, calculate time 'till oldest record expires */
cab8d5
   if (count > daemon->ftabsize)
cab8d5
     {
cab8d5
+      static time_t last_log = 0;
cab8d5
+      
cab8d5
       if (oldest && wait)
cab8d5
 	*wait = oldest->time + (time_t)TIMEOUT - now;
cab8d5
+      
cab8d5
+      if ((int)difftime(now, last_log) > 5)
cab8d5
+	{
cab8d5
+	  last_log = now;
cab8d5
+	  my_syslog(LOG_WARNING, _("Maximum number of concurrent DNS queries reached (max: %d)"), daemon->ftabsize);
cab8d5
+	}
cab8d5
+
cab8d5
       return NULL;
cab8d5
     }
cab8d5
   
cab8d5
-- 
cab8d5
1.7.2.5
cab8d5