Bug 13027 - resolver fails when using option rotate with a single IPv6 nameserver
Summary: resolver fails when using option rotate with a single IPv6 nameserver
Status: RESOLVED DUPLICATE of bug 13028
Alias: None
Product: glibc
Classification: Unclassified
Component: network (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-25 22:03 UTC by Aurelien Jarno
Modified: 2014-06-27 12:45 UTC (History)
2 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Last reconfirmed:
fweimer: security-


Attachments
Potential fix, based on code from Aurelien (381 bytes, patch)
2012-05-23 19:48 UTC, law
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aurelien Jarno 2011-07-25 22:03:11 UTC
When resolv.conf contains a single IPv6 nameserver, and the rotate option, the resolver correctly send the requests, but ignore all the answers.

This is due to the initialization of the maps in res_send.c(__libc_res_nsend). For IPv6 nameservers, the map is already initialized, so with a single nameserver, the code creates a second one.

When the rotate option is activated, the nameservers are swapped, which means the first one is the non-existing one.

A patch to fix that is attached.
Comment 1 law 2012-05-23 19:48:02 UTC
Created attachment 6418 [details]
Potential fix, based on code from Aurelien
Comment 2 law 2012-07-25 20:19:16 UTC
Patch is no good.

After further investigation and testing the problems I'm aware of with the rotate option are all resolved with the patch attached to 13028.

*** This bug has been marked as a duplicate of bug 13028 ***