|
|
b40826 |
2010-11-24 Andreas Schwab <schwab@redhat.com>
|
|
|
b40826 |
|
|
|
b40826 |
* resolv/nss_dns/dns-host.c (getanswer_r): Don't handle ttl == 0
|
|
|
b40826 |
specially.
|
|
|
b40826 |
(gaih_getanswer_slice): Likewise.
|
|
|
b40826 |
|
|
|
b40826 |
Index: glibc-2.12-2-gc4ccff1/resolv/nss_dns/dns-host.c
|
|
|
b40826 |
===================================================================
|
|
|
b40826 |
--- glibc-2.12-2-gc4ccff1.orig/resolv/nss_dns/dns-host.c
|
|
|
b40826 |
+++ glibc-2.12-2-gc4ccff1/resolv/nss_dns/dns-host.c
|
|
|
b40826 |
@@ -599,7 +599,6 @@ getanswer_r (const querybuf *answer, int
|
|
|
b40826 |
int (*name_ok) (const char *);
|
|
|
b40826 |
u_char packtmp[NS_MAXCDNAME];
|
|
|
b40826 |
int have_to_map = 0;
|
|
|
b40826 |
- int32_t ttl = 0;
|
|
|
b40826 |
uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data);
|
|
|
b40826 |
buffer += pad;
|
|
|
b40826 |
if (__builtin_expect (buflen < sizeof (struct host_data) + pad, 0))
|
|
|
b40826 |
@@ -733,7 +732,7 @@ getanswer_r (const querybuf *answer, int
|
|
|
b40826 |
cp += INT16SZ; /* type */
|
|
|
b40826 |
class = __ns_get16 (cp);
|
|
|
b40826 |
cp += INT16SZ; /* class */
|
|
|
b40826 |
- ttl = __ns_get32 (cp);
|
|
|
b40826 |
+ int32_t ttl = __ns_get32 (cp);
|
|
|
b40826 |
cp += INT32SZ; /* TTL */
|
|
|
b40826 |
n = __ns_get16 (cp);
|
|
|
b40826 |
cp += INT16SZ; /* len */
|
|
|
b40826 |
@@ -907,7 +906,7 @@ getanswer_r (const querybuf *answer, int
|
|
|
b40826 |
{
|
|
|
b40826 |
register int nn;
|
|
|
b40826 |
|
|
|
b40826 |
- if (ttlp != NULL && ttl != 0)
|
|
|
b40826 |
+ if (ttlp != NULL)
|
|
|
b40826 |
*ttlp = ttl;
|
|
|
b40826 |
if (canonp != NULL)
|
|
|
b40826 |
*canonp = bp;
|
|
|
b40826 |
@@ -1163,7 +1162,7 @@ gaih_getanswer_slice (const querybuf *an
|
|
|
b40826 |
|
|
|
b40826 |
if (*firstp)
|
|
|
b40826 |
{
|
|
|
b40826 |
- if (ttl != 0 && ttlp != NULL)
|
|
|
b40826 |
+ if (ttlp != NULL)
|
|
|
b40826 |
*ttlp = ttl;
|
|
|
b40826 |
|
|
|
b40826 |
(*pat)->name = canon ?: h_name;
|