Package: dnsmasq
Version: 2.20-1
Severity: normal
Tags: patch
I have on my dnsmasq server (192.168.0.1) :
127.0.0.1 localhost shatzy
192.168.0.1 shatzy
>From a client :
[poomerang:~] arnaud$ dig @192.168.0.1 shatzy
; <<>> DiG 9.2.5 <<>> @192.168.0.1 shatzy
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19790
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;shatzy. IN A
;; ANSWER SECTION:
shatzy. 0 IN A 127.0.0.1
shatzy. 0 IN A 192.168.0.1
;; Query time: 4 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Mon Mar 21 11:49:58 2005
;; MSG SIZE rcvd: 56
dnsmasq should not answer with the 127.0.0.1 "records"...
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.9-ck3
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages dnsmasq depends on:
ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an
ii netbase 4.20 Basic TCP/IP networking system
diff -ru dnsmasq-2.20/src/cache.c dnsmasq-2.20-patch/src/cache.c
--- dnsmasq-2.20/src/cache.c 2005-01-22 21:26:55.000000000 +0100
+++ dnsmasq-2.20-patch/src/cache.c 2005-03-21 11:57:39.499471304 +0100
@@ -558,6 +558,7 @@
{
FILE *f = fopen(filename, "r");
char *line;
+ char *mon_hote = "127.0.0.1";
int count = 0, lineno = 0;
if (!f)
@@ -577,6 +578,8 @@
if (!token || (*token == '#'))
continue;
+ if(strstr(token, mon_hote) != NULL)
+ continue;
#ifdef HAVE_IPV6
if (inet_pton(AF_INET, token, &addr) == 1)
@@ -601,6 +604,7 @@
while ((token = strtok(NULL, " \t\n\r")) && (*token != '#'))
{
+
struct crec *cache;
if (canonicalise(token))
{