[Bug libc/10851] New: no fallback to nameserver 0.0.0.0 if /etc/resolv.conf is missing

View: New views
5 Messages — Rating Filter:   Alert me  

[Bug libc/10851] New: no fallback to nameserver 0.0.0.0 if /etc/resolv.conf is missing

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Starting with glibc 2.10, there is no fallback to nameserver 0.0.0.0 anymore if
/etc/resolv.conf is missing. This is due to this change:

2008-12-02  Ulrich Drepper  <drepper@...>

        * resolv/res_init.c (__res_vinit): Initialize nscount to zero.

This value should be set back to 1 so that the following code is actually useful:
#ifdef USELOOPBACK
        statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
#else
        statp->nsaddr.sin_addr.s_addr = INADDR_ANY;
#endif
        statp->nsaddr.sin_family = AF_INET;
        statp->nsaddr.sin_port = htons(NAMESERVER_PORT);

--
           Summary: no fallback to nameserver 0.0.0.0 if /etc/resolv.conf is
                    missing
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: aurelien at aurel32 dot net
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10851

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug libc/10851] no fallback to nameserver 0.0.0.0 if /etc/resolv.conf is missing

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From aurelien at aurel32 dot net  2009-10-26 17:38 -------
Created an attachment (id=4322)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4322&action=view)
Patch to fix the problem


--


http://sourceware.org/bugzilla/show_bug.cgi?id=10851

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug libc/10851] no fallback to nameserver 0.0.0.0 if /etc/resolv.conf is missing

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From aurelien at aurel32 dot net  2009-11-08 18:41 -------
Created an attachment (id=4369)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4369&action=view)
New patch

The previous patch does not work in case /etc/resolv.conf exists, but does not
contain a nameserver entry. This new patch also takes that into account.

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #4322 is|0                           |1
           obsolete|                            |


http://sourceware.org/bugzilla/show_bug.cgi?id=10851

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug libc/10851] no fallback to nameserver 0.0.0.0 if /etc/resolv.conf is missing

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From pasky at suse dot cz  2009-11-09 16:38 -------
See also http://sourceware.org/ml/libc-alpha/2009-02/msg00028.html :(

--


http://sourceware.org/bugzilla/show_bug.cgi?id=10851

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug libc/10851] no fallback to nameserver 0.0.0.0 if /etc/resolv.conf is missing

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From pasky at suse dot cz  2009-11-20 08:28 -------
Created an attachment (id=4402)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4402&action=view)
alternative patch

Oops, I haven't noticed you already implemented a fix; anyway, here's what I've
done independently, somewhat simpler patch. YMMV.

--


http://sourceware.org/bugzilla/show_bug.cgi?id=10851

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.