]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Fix bad cache-size calculation when hosts-file read fails.
authorAndré Glüpker <andre.gluepker@st.ovgu.de>
Tue, 12 Jan 2016 12:54:17 +0000 (12:54 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Tue, 12 Jan 2016 12:54:17 +0000 (12:54 +0000)
CHANGELOG
src/cache.c

index 93c73d01e19562d27d5c56a3a87c8211422f20a1..dcaa699c6258955a28766cc59bf3c86b34544175 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -18,6 +18,10 @@ version 2.76
            that the same name is empty. Thanks to Edwin Török for
            the patch.
 
+           Fix failure to correctly calculate cache-size when 
+           reading a hosts-file fails. Thanks to André Glüpker 
+           for the patch.
+
        
 version 2.75
             Fix reversion on 2.74 which caused 100% CPU use when a 
index d4b71a514c9acf6fd21634cb0132a34811f96a04..a9eaa65445ea9b21bc0e16072eef5ea9679813f3 100644 (file)
@@ -919,7 +919,7 @@ int read_hostsfile(char *filename, unsigned int index, int cache_size, struct cr
   if (!f)
     {
       my_syslog(LOG_ERR, _("failed to load names from %s: %s"), filename, strerror(errno));
-      return 0;
+      return cache_size;
     }
   
   eatspace(f);