diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-09-10 12:56:51 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-09-10 12:56:51 +0000 |
commit | 482a3be2990e5d2778b3d7b339cbb1d4cda43dae (patch) | |
tree | d19d228cd5d8728c0a0f71e599b5ce18da1260f5 | |
parent | e8238963476c9691112f137ed842ccfe1b80af22 (diff) | |
download | glibc-482a3be2990e5d2778b3d7b339cbb1d4cda43dae.tar.gz glibc-482a3be2990e5d2778b3d7b339cbb1d4cda43dae.tar.xz glibc-482a3be2990e5d2778b3d7b339cbb1d4cda43dae.zip |
Update.
1998-09-10 12:51 Ulrich Drepper <drepper@cygnus.com> * resolv/res_init.c (res_init): Initialize _res.nscount and _res.nsaddr.sin_port differently for the can when no loopback is available to allow immediate timeout in non-networking environments. Patch by Cristian Gafton <gafton@redhat.com>.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | resolv/res_init.c | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index dbed963641..1c7c700249 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1998-09-10 12:51 Ulrich Drepper <drepper@cygnus.com> + + * resolv/res_init.c (res_init): Initialize _res.nscount and + _res.nsaddr.sin_port differently for the can when no loopback + is available to allow immediate timeout in non-networking environments. + Patch by Cristian Gafton <gafton@redhat.com>. + 1998-09-10 Andreas Jaeger <aj@arthur.rhein-neckar.de> * localedata/charmaps/ISO-8859-10: Character 0xBD is HORIZONTAL diff --git a/resolv/res_init.c b/resolv/res_init.c index 906a2b1571..2d2459d5a3 100644 --- a/resolv/res_init.c +++ b/resolv/res_init.c @@ -206,12 +206,14 @@ res_init() #ifdef USELOOPBACK _res.nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1); + _res.nscount = 1; + _res.nsaddr.sin_port = htons(NAMESERVER_PORT); #else _res.nsaddr.sin_addr.s_addr = INADDR_ANY; + _res.nscount = 0; + _res.nsaddr.sin_port = 0; #endif _res.nsaddr.sin_family = AF_INET; - _res.nsaddr.sin_port = htons(NAMESERVER_PORT); - _res.nscount = 1; _res.ndots = 1; _res.pfcode = 0; |