Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 599551 Details for
Bug 841787
rotate option in resolv.conf causes lookup failures
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix handling of nameserver addresses
0001-Fix-handling-of-nameserver-addresses.patch (text/plain), 2.76 KB, created by
Michael Chapman
on 2012-07-21 23:11:48 UTC
(
hide
)
Description:
Fix handling of nameserver addresses
Filename:
MIME Type:
Creator:
Michael Chapman
Created:
2012-07-21 23:11:48 UTC
Size:
2.76 KB
patch
obsolete
>From 16ca4fb21c23e14c5fb12c9931017285eda0b9c7 Mon Sep 17 00:00:00 2001 >From: Michael Chapman <mike@very.puzzling.org> >Date: Sat, 21 Jul 2012 22:48:29 +1000 >Subject: [PATCH] Fix handling of nameserver addresses > >- IPv4 addresses get packed to the front of statp->nsaddr_list. >- EXT(statp).nscount only tracks the number of IPv4 addresses. >- The correct IPv4 address is copied into each EXT(statp).nsaddrs entry. >--- > resolv/res_init.c | 6 +++--- > resolv/res_send.c | 26 +++++++++++++------------- > 2 files changed, 16 insertions(+), 16 deletions(-) > >diff --git a/resolv/res_init.c b/resolv/res_init.c >index c58c763..2e3d0f7 100644 >--- a/resolv/res_init.c >+++ b/resolv/res_init.c >@@ -307,9 +307,9 @@ __res_vinit(res_state statp, int preinit) { > cp++; > if ((*cp != '\0') && (*cp != '\n') > && __inet_aton(cp, &a)) { >- statp->nsaddr_list[nservall].sin_addr = a; >- statp->nsaddr_list[nservall].sin_family = AF_INET; >- statp->nsaddr_list[nservall].sin_port = >+ statp->nsaddr_list[nserv].sin_addr = a; >+ statp->nsaddr_list[nserv].sin_family = AF_INET; >+ statp->nsaddr_list[nserv].sin_port = > htons(NAMESERVER_PORT); > nserv++; > #ifdef _LIBC >diff --git a/resolv/res_send.c b/resolv/res_send.c >index 0a841e9..ce2c56e 100644 >--- a/resolv/res_send.c >+++ b/resolv/res_send.c >@@ -409,7 +409,6 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen, > */ > if (EXT(statp).nsinit == 0) { > unsigned char map[MAXNS]; >- unsigned int ext_total_nscount; > > memset (map, MAXNS, sizeof (map)); > for (n = 0; n < MAXNS; n++) { >@@ -422,17 +421,18 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen, > EXT(statp).nsmap[n] = MAXNS; > } > } >- n = statp->nscount; >- ext_total_nscount = EXT(statp).nscount + EXT(statp).nscount6; >- for (n = 0, ns = 0; n < statp->nscount - ext_total_nscount; n++) { >- while (ns < MAXNS >- && EXT(statp).nsmap[ns] != MAXNS) >- ns++; >- if (ns == MAXNS) >- break; >- EXT(statp).nsmap[ns] = n; >- map[n] = ns++; >- } >+ n = statp->nscount - EXT(statp).nscount6; >+ if (n > EXT(statp).nscount) >+ for (n = EXT(statp).nscount, ns = 0; >+ n < statp->nscount - EXT(statp).nscount6; n++) { >+ while (ns < MAXNS >+ && EXT(statp).nsmap[ns] != MAXNS) >+ ns++; >+ if (ns == MAXNS) >+ break; >+ EXT(statp).nsmap[ns] = n; >+ map[n] = ns++; >+ } > EXT(statp).nscount = n; > for (ns = 0; ns < EXT(statp).nscount; ns++) { > n = map[ns]; >@@ -441,7 +441,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen, > malloc(sizeof (struct sockaddr_in6)); > if (EXT(statp).nsaddrs[n] != NULL) { > memset (mempcpy(EXT(statp).nsaddrs[n], >- &statp->nsaddr_list[n], >+ &statp->nsaddr_list[ns], > sizeof (struct sockaddr_in)), > '\0', > sizeof (struct sockaddr_in6) >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 841787
: 599551 |
600399
|
600680