mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
[BZ #4647]
Tomas Janousek <tjanouse@redhat.com> Ulrich Drepper <drepper@redhat.com> [BZ #4647] * resolv/res_send.c (send_dg): Remove socket_pf. Use ipv6_unavail member in __res_state, only convaddr4to6 if nssocks[ns] is a PF_INET6 socket. * resolv/resolv.h (__res_state): Add ipv6_unavail member. Make unused member a bitmap. * resolv/res_init.c (__res_vinit): Reset ipv6_unavail if IPv6 servers are configured. 2007-06-18 Jakub Jelinek <jakub@redhat.com>
This commit is contained in:
@ -241,8 +241,8 @@ __res_vinit(res_state statp, int preinit) {
|
||||
line[sizeof(name) - 1] == '\t'))
|
||||
|
||||
if ((fp = fopen(_PATH_RESCONF, "rc")) != NULL) {
|
||||
/* No threads use this stream. */
|
||||
__fsetlocking (fp, FSETLOCKING_BYCALLER);
|
||||
/* No threads use this stream. */
|
||||
__fsetlocking (fp, FSETLOCKING_BYCALLER);
|
||||
/* read the config file */
|
||||
while (fgets_unlocked(buf, sizeof(buf), fp) != NULL) {
|
||||
/* skip comments */
|
||||
@ -397,8 +397,11 @@ __res_vinit(res_state statp, int preinit) {
|
||||
if (nserv > 1)
|
||||
statp->nscount = nserv;
|
||||
#ifdef _LIBC
|
||||
if (nservall - nserv > 0)
|
||||
if (nservall - nserv > 0) {
|
||||
statp->_u._ext.nscount6 = nservall - nserv;
|
||||
/* We try IPv6 servers again. */
|
||||
statp->ipv6_unavail = false;
|
||||
}
|
||||
#endif
|
||||
#ifdef RESOLVSORT
|
||||
statp->nsort = nsort;
|
||||
|
Reference in New Issue
Block a user