DNS proxy, "host" command and hosts files

Bug #681356 reported by Miika Komu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HIPL
New
Low
Paul Tötterman

Bug Description

DNS proxy behaves strangely when looking up a host name that is located in the /etc/hip/hosts and /etc/hosts files. The strange behavior occurs with host command:

mkomu@bling:~$ host gai
gai has address 1.0.0.2
gai has IPv6 address 2001:15:e156:8a78:3226:dbaa:f2ff:ed06
Host gai not found: 3(NXDOMAIN)

But apparently not with dig:

mkomu@bling:~$ dig gai

; <<>> DiG 9.7.1-P2 <<>> gai
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1814
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;gai. IN A

;; ANSWER SECTION:
gai. 122 IN A 1.0.0.2

;; Query time: 315 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Thu Nov 25 13:44:29 2010
;; MSG SIZE rcvd: 37

Revision history for this message
Miika Komu (miika-iki) wrote :

To clarify, the look up with "host" is successful but returns strangely an error:

Host gai not found: 3(NXDOMAIN)

Changed in hipl:
importance: Undecided → Low
assignee: nobody → Artturi Karila (artturi-karila)
Miika Komu (miika-iki)
Changed in hipl:
assignee: Artturi Karila (artturi-karila) → Paul Tötterman (paul-totterman)
Revision history for this message
Paul Tötterman (ptman) wrote :

Cannot reproduce.

What is the hosts -setting in your nsswitch.conf? I had:

hosts: files dns

and still strangely got the response from the hip dns proxy first.

Revision history for this message
Miika Komu (miika-iki) wrote :

I am running Ubuntu lucid and oneiric. They both have the same configuration:

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

I tried also your configration, reboot the machine and tried again. The same problem occurs.

Note: the problem occurs independently of whether I am running dnsmasq or not

Revision history for this message
Miika Komu (miika-iki) wrote :

My hosts file configuration is as follows:

mkomu@bling:~$ grep gai /etc/hip/hosts /etc/hosts
/etc/hip/hosts:2001:15:e156:8a78:3226:dbaa:f2ff:ed06 gai
/etc/hip/hosts:1.0.0.2 gai
/etc/hosts:82.181.188.197 gai

Note: I do have some other entries as well.

Revision history for this message
Miika Komu (miika-iki) wrote :

Actually the error may be unrelated to DNS proxy. If I stop it, I get exactly the same error and no IP address is returned.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.