Name resolution does not work with IPv6 only name servers
Bug #752583 reported by
dnmvisser
This bug affects 14 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mtr |
Fix Released
|
Medium
|
Unassigned | ||
mtr (Debian) |
Confirmed
|
Unknown
|
|||
mtr (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
When only IPv6 name servers are listed in /etc/resolv.conf, name resolution does not work.
Related branches
lp://staging/~hloeung/ubuntu/utopic/mtr/fix-ipv6-nameservers
Rejected
for merging
into
lp://staging/ubuntu/utopic/mtr
- Ubuntu Development Team: Pending requested
-
Diff: 1593 lines (+1547/-0)8 files modified.pc/.quilt_patches (+1/-0)
.pc/.quilt_series (+1/-0)
.pc/.version (+1/-0)
.pc/0001-fix-only-ipv6-nameservers.patch/dns.c (+1506/-0)
.pc/applied-patches (+1/-0)
debian/changelog (+13/-0)
debian/patches/0001-fix-only-ipv6-nameservers.patch (+23/-0)
debian/patches/series (+1/-0)
Changed in mtr (Debian): | |
status: | Unknown → New |
Changed in mtr: | |
status: | New → Confirmed |
Changed in mtr (Debian): | |
status: | New → Confirmed |
Changed in mtr: | |
status: | Confirmed → Fix Committed |
Changed in mtr: | |
status: | Fix Committed → Fix Released |
tags: | removed: patch |
Changed in mtr (Ubuntu): | |
assignee: | Haw Loeung (hloeung) → nobody |
Changed in mtr (Debian): | |
importance: | Unknown → Medium |
Changed in mtr (Ubuntu): | |
status: | In Progress → Confirmed |
importance: | Undecided → Medium |
Changed in mtr (Debian): | |
importance: | Medium → Unknown |
To post a comment you must log in.
Looking through the code, the first sign of trouble is in dns_open() on line 504: nsaddr_ list[i] .sin_family = AF_INET;
for (i = 0;i < myres.nscount;i++)
myres.
resfd = socket(AF_INET, SOCK_DGRAM, 0);
Two assumptions that we will be dealing with v4 resolvers only.
Later, in dns_ack() on line 1253 we see more AF_INET used in comparing the response to make sure it was something we sent.
I presume handling DNS in this way was done so calls would be asynchronous. Could getaddrinfo_a() be employed instead to put some of the burden back on the system resolver library?