aboutsummaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-10-12 00:56:05 +0000
committerUlrich Drepper <drepper@redhat.com>1996-10-12 00:56:05 +0000
commit1f64ac13c02e70285e26a0572d9393a3ee0f9ad8 (patch)
tree8f146d2ac4d9c1afb5206d403352d7889a006891 /resolv
parentb33f91e91da81059b388c8f8ee0d0024212eb180 (diff)
downloadglibc-1f64ac13c02e70285e26a0572d9393a3ee0f9ad8.zip
glibc-1f64ac13c02e70285e26a0572d9393a3ee0f9ad8.tar.gz
glibc-1f64ac13c02e70285e26a0572d9393a3ee0f9ad8.tar.bz2
update from main archive 961011
Fri Oct 11 19:13:34 1996 Ulrich Drepper <drepper@cygnus.com> * locale/Makefile (CPPFLAGS): Set CHARMAP_PATH to "$(i18ndir)/charmaps". Fri Oct 11 22:12:41 1996 NIIBE Yutaka <gniibe@mri.co.jp> * sysdeps/unix/sysv/linux/sys/procfs.h: Include <asm/user.h> to get definition of FPU description struct. * sysdeps/unix/sysv/linux/Makefile [$(subdir)=socket] (subdir_headers): Add net/if.h, net/if_ppp.h, net/ppp-comp.h, net/ppp_defs.h, net/if_arp.h, and net/route.h. * sysdeps/unix/sysv/linux/net/if_arp.h: New file. * sysdeps/unix/sysv/linux/net/route.h: New file. Fri Oct 11 14:49:13 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/stub/readdir_r.c: New file. We need a stub version. * sysdeps/stub/e_acosl.c: Likewise. * sysdeps/stub/e_asinl.c: Likewise. * sysdeps/stub/e_atan2l.c: Likewise. * sysdeps/stub/e_expl.c: Likewise. * sysdeps/stub/e_fmodl.c: Likewise. * sysdeps/stub/e_log10l.c: Likewise. * sysdeps/stub/e_logl.c: Likewise. * sysdeps/stub/e_sqrtl.c: Likewise. * sysdeps/stub/s_atanl.c: Likewise. * sysdeps/stub/s_log1pl.c: Likewise. * Makefile (distribute): Add nsswitch.h and netgroup.h. * nss/Makefile (generated): db-netgrp.c is not generated. * sysdeps/alpha/Dist: Add stxcpy.S and stxncpy.S. * Make-dist (+out): Add $(dont_distribute). Fri Oct 11 00:27:18 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * stdio-common/Makefile (routines): Add tmpnam_r. Fri Oct 11 05:32:51 1996 Ulrich Drepper <drepper@cygnus.com> * version.h: Bump version to 1.96. Fri Oct 11 18:13:47 1996 Andreas Jaeger <aj@arthur.pfalz.de> * stdio-common/tst-printf.c: Some more cleanups. Fri Oct 11 02:48:02 1996 Ulrich Drepper <drepper@cygnus.com> * resolv/arpa/nameser.h: Update from bind-4.9.5-T6B. * resolv/resolv.h: Likewise. * resolv/gethnamaddr.c: Likewise. * resolv/res_comp.c: Likewise. * resolv/res_debug.c: Likewise. * resolv/res_init.c: Likewise. * resolv/res_send.c: Likewise. * resolv/Banner: Update version number. * nss/nss_dns/dns-host.c: Update according to change in resolv/gethnamaddr.c. Fri Oct 10 20:52:28 1996 Ralph Loader <loader@maths.ox.ac.uk> * crypt/md5.c (md5_stream): When reading the block in several pieces append to instead of replace previously read data. Thu Oct 10 15:53:17 1996 Richard Henderson <rth@tamu.edu> * sysdeps/alpha/stxcpy.S ($unaligned): In single word copy, correct last-byte-written bit for source word misalignment. * sysdeps/alpha/strchr.c: Removed. There is now an assembler version. Thu Oct 10 17:17:23 1996 Ulrich Drepper <drepper@cygnus.com> * sunrpc/Makefile (rpcsvc): Remove yp.x. The corrected version comes with glibc-nis. * sunrpc/rpcsvc/yp.x: Removed. * nss/nss_files/files-netgr.c (_nss_netgroup_parseline): Test for *CURSOR to be NULL and dump a core if yes. Thu Oct 9 20:09:53 1996 Matthew Jacob <mjacob@feral.com> * sysdeps/unix/sysv/linux/alpha/brk.S: Define _ERRNO_H before including <errnos.h> to get error numbers. Thu Oct 10 14:00:01 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/i386/sigcontext.h: Moved file... * sysdeps/unix/sysv/linux/sigcontext.h: ...to here. So the Alpha people find a correct file. * sysdeps/libm-ieee754/w_cabs.c: We cannot make __cabsl simply an alias of __cabs since the structures have different names. * sysdeps/libm-ieee754/w_log10.c: Fix typo in weak_alias. Reported by Matthew Jacob <mjacob@feral.com>. simply a wrapper around the <linux/elfcore.h> file since the
Diffstat (limited to 'resolv')
-rw-r--r--resolv/Banner2
-rw-r--r--resolv/arpa/nameser.h7
-rw-r--r--resolv/gethnamaddr.c11
-rw-r--r--resolv/res_comp.c8
-rw-r--r--resolv/res_debug.c30
-rw-r--r--resolv/res_init.c2
-rw-r--r--resolv/res_send.c52
-rw-r--r--resolv/resolv.h6
8 files changed, 75 insertions, 43 deletions
diff --git a/resolv/Banner b/resolv/Banner
index e08f0b4..5d0dc48 100644
--- a/resolv/Banner
+++ b/resolv/Banner
@@ -1 +1 @@
-BIND-4.9.5-T4B
+BIND-4.9.5-T6B
diff --git a/resolv/arpa/nameser.h b/resolv/arpa/nameser.h
index 2352af6..66b3530 100644
--- a/resolv/arpa/nameser.h
+++ b/resolv/arpa/nameser.h
@@ -92,10 +92,8 @@
#include <sys/cdefs.h>
#ifdef _AUX_SOURCE
-#include <sys/types.h> /* ech for A/UX */
-#define res_send ucb_res_send /* already def'd in libc */
-#define _res_close _ucb_res_close /* removing res_send.o from the library */
-#endif /* gives an undefined symbol... */
+# include <sys/types.h>
+#endif
/*
* revision information. this is the release date in YYYYMMDD format.
@@ -182,6 +180,7 @@
#define T_NIMLOC 32 /* Nimrod locator */
#define T_SRV 33 /* Server selection */
#define T_ATMA 34 /* ATM Address */
+#define T_NAPTR 35 /* Naming Authority PoinTeR */
/* non standard */
#define T_UINFO 100 /* user (finger) information */
#define T_UID 101 /* user ID */
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c
index 1cae1f7..7c3096c 100644
--- a/resolv/gethnamaddr.c
+++ b/resolv/gethnamaddr.c
@@ -341,12 +341,11 @@ getanswer(answer, anslen, qname, qtype)
cp += n;
continue; /* XXX - had_error++ ? */
}
- if (haveanswer) {
- if (n != host.h_length) {
- cp += n;
- continue;
- }
- } else {
+ if (n != host.h_length) {
+ cp += n;
+ continue;
+ }
+ if (!haveanswer) {
register int nn;
host.h_name = bp;
diff --git a/resolv/res_comp.c b/resolv/res_comp.c
index 76f7cea..d96fe6e 100644
--- a/resolv/res_comp.c
+++ b/resolv/res_comp.c
@@ -394,8 +394,12 @@ int
res_ownok(dn)
const char *dn;
{
- if (asterchar(dn[0]) && periodchar(dn[1]))
- dn += 2;
+ if (asterchar(dn[0])) {
+ if (periodchar(dn[1]))
+ return (res_hnok(dn+2));
+ if (dn[1] == '\0')
+ return (1);
+ }
return (res_hnok(dn));
}
diff --git a/resolv/res_debug.c b/resolv/res_debug.c
index cc6f84f..49eef72 100644
--- a/resolv/res_debug.c
+++ b/resolv/res_debug.c
@@ -671,7 +671,7 @@ __p_rr(cp, msg, file)
fprintf(file, "\t%s", inet_ntop(AF_INET6, cp, t, sizeof t));
cp += dlen;
break;
- }
+ }
case T_LOC: {
char t[255];
@@ -679,7 +679,30 @@ __p_rr(cp, msg, file)
(void) fprintf(file, "\t%s", loc_ntoa(cp, t));
cp += dlen;
break;
- }
+ }
+
+ case T_NAPTR: {
+ u_int order, preference;
+
+ order = _getshort(cp); cp += INT16SZ;
+ preference = _getshort(cp); cp += INT16SZ;
+ fprintf(file, "\t%u %u ",order, preference);
+ /* Flags */
+ n = *cp++;
+ fprintf(file,"\"%.*s\" ", (int)n, cp);
+ cp += n;
+ /* Service */
+ n = *cp++;
+ fprintf(file,"\"%.*s\" ", (int)n, cp);
+ cp += n;
+ /* Regexp */
+ n = *cp++;
+ fprintf(file,"\"%.*s\" ", (int)n, cp);
+ cp += n;
+ if ((cp = p_fqname(cp, msg, file)) == NULL)
+ return (NULL);
+ break;
+ }
case T_SRV: {
u_int priority, weight, port;
@@ -691,7 +714,7 @@ __p_rr(cp, msg, file)
if ((cp = p_fqname(cp, msg, file)) == NULL)
return (NULL);
break;
- }
+ }
case T_MINFO:
case T_RP:
@@ -908,6 +931,7 @@ const struct res_sym __p_type_syms[] = {
{T_UINFO, "UINFO", "user information (nonstandard)"},
{T_UID, "UID", "user ID (nonstandard)"},
{T_GID, "GID", "group ID (nonstandard)"},
+ {T_NAPTR, "NAPTR", "URN Naming Authority"},
#ifdef ALLOW_T_UNSPEC
{T_UNSPEC, "UNSPEC", "unspecified data (nonstandard)"},
#endif /* ALLOW_T_UNSPEC */
diff --git a/resolv/res_init.c b/resolv/res_init.c
index c8a74f6..4599486 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -645,7 +645,7 @@ netinfo_res_init(haveenv, havesearch)
}
#endif /* NeXT */
-u_int16_t
+u_int
res_randomid()
{
struct timeval now;
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 3efc6cf..a5b4fba 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -94,8 +94,6 @@ static char rcsid[] = "$Id$";
# include <../conf/options.h>
#endif
-void _res_close __P((void));
-
static int s = -1; /* socket used for communications */
static int connected = 0; /* is the socket connected */
static int vc = 0; /* is the socket a virtual ciruit? */
@@ -320,7 +318,7 @@ res_send(buf, buflen, ans, anssiz)
struct sockaddr_in *nsap = &_res.nsaddr_list[ns];
same_ns:
if (badns & (1 << ns)) {
- _res_close();
+ res_close();
goto next_ns;
}
@@ -337,7 +335,7 @@ res_send(buf, buflen, ans, anssiz)
done = 1;
break;
case res_nextns:
- _res_close();
+ res_close();
goto next_ns;
case res_done:
return (resplen);
@@ -372,7 +370,7 @@ res_send(buf, buflen, ans, anssiz)
truncated = 0;
if ((s < 0) || (!vc)) {
if (s >= 0)
- _res_close();
+ res_close();
s = socket(PF_INET, SOCK_STREAM, 0);
if (s < 0) {
@@ -387,7 +385,7 @@ res_send(buf, buflen, ans, anssiz)
Aerror(stderr, "connect/vc",
errno, *nsap);
badns |= (1 << ns);
- _res_close();
+ res_close();
goto next_ns;
}
vc = 1;
@@ -404,7 +402,7 @@ res_send(buf, buflen, ans, anssiz)
terrno = errno;
Perror(stderr, "write failed", errno);
badns |= (1 << ns);
- _res_close();
+ res_close();
goto next_ns;
}
/*
@@ -421,7 +419,7 @@ read_len:
if (n <= 0) {
terrno = errno;
Perror(stderr, "read failed", errno);
- _res_close();
+ res_close();
/*
* A long running process might get its TCP
* connection reset if the remote server was
@@ -433,10 +431,10 @@ read_len:
*/
if (terrno == ECONNRESET && !connreset) {
connreset = 1;
- _res_close();
+ res_close();
goto same_ns;
}
- _res_close();
+ res_close();
goto next_ns;
}
resplen = _getshort(ans);
@@ -457,7 +455,7 @@ read_len:
if (n <= 0) {
terrno = errno;
Perror(stderr, "read(vc)", errno);
- _res_close();
+ res_close();
goto next_ns;
}
if (truncated) {
@@ -504,7 +502,7 @@ read_len:
if ((s < 0) || vc) {
if (vc)
- _res_close();
+ res_close();
s = socket(PF_INET, SOCK_DGRAM, 0);
if (s < 0) {
#if !CAN_RECONNECT
@@ -544,7 +542,7 @@ read_len:
"connect(dg)",
errno, *nsap);
badns |= (1 << ns);
- _res_close();
+ res_close();
goto next_ns;
}
connected = 1;
@@ -552,7 +550,7 @@ read_len:
if (send(s, (char*)buf, buflen, 0) != buflen) {
Perror(stderr, "send", errno);
badns |= (1 << ns);
- _res_close();
+ res_close();
goto next_ns;
}
} else {
@@ -589,7 +587,7 @@ read_len:
!= buflen) {
Aerror(stderr, "sendto", errno, *nsap);
badns |= (1 << ns);
- _res_close();
+ res_close();
goto next_ns;
}
}
@@ -612,7 +610,7 @@ read_len:
if (errno == EINTR)
goto wait;
Perror(stderr, "select", errno);
- _res_close();
+ res_close();
goto next_ns;
}
if (n == 0) {
@@ -622,7 +620,7 @@ read_len:
Dprint(_res.options & RES_DEBUG,
(stdout, ";; timeout\n"));
gotsomewhere = 1;
- _res_close();
+ res_close();
goto next_ns;
}
__set_errno (0);
@@ -631,7 +629,7 @@ read_len:
(struct sockaddr *)&from, &fromlen);
if (resplen <= 0) {
Perror(stderr, "recvfrom", errno);
- _res_close();
+ res_close();
goto next_ns;
}
gotsomewhere = 1;
@@ -683,7 +681,7 @@ read_len:
(stdout, "server rejected query:\n"),
ans, (resplen>anssiz)?anssiz:resplen);
badns |= (1 << ns);
- _res_close();
+ res_close();
/* don't retry if called from dig */
if (!_res.pfcode)
goto next_ns;
@@ -696,7 +694,7 @@ read_len:
Dprint(_res.options & RES_DEBUG,
(stdout, ";; truncated answer\n"));
v_circuit = 1;
- _res_close();
+ res_close();
goto same_ns;
}
} /*if vc/dg*/
@@ -718,7 +716,7 @@ read_len:
*/
if ((v_circuit && (!(_res.options & RES_USEVC) || ns != 0)) ||
!(_res.options & RES_STAYOPEN)) {
- _res_close();
+ res_close();
}
if (Rhook) {
int done = 0, loops = 0;
@@ -734,7 +732,7 @@ read_len:
done = 1;
break;
case res_nextns:
- _res_close();
+ res_close();
goto next_ns;
case res_modified:
/* give the hook another try */
@@ -753,7 +751,7 @@ read_len:
next_ns: ;
} /*foreach ns*/
} /*foreach retry*/
- _res_close();
+ res_close();
if (!v_circuit)
if (!gotsomewhere)
__set_errno (ECONNREFUSED); /* no nameservers found */
@@ -772,7 +770,7 @@ read_len:
* This routine is not expected to be user visible.
*/
void
-_res_close()
+res_close()
{
if (s >= 0) {
(void) close(s);
@@ -787,6 +785,12 @@ _res_close()
* there is more gunk of this kind over in res_debug.c.
*/
+void
+_res_close()
+{
+ res_close();
+}
+
#undef res_send
int
res_send(buf, buflen, ans, anssiz)
diff --git a/resolv/resolv.h b/resolv/resolv.h
index e5ec75a..fe90ab5 100644
--- a/resolv/resolv.h
+++ b/resolv/resolv.h
@@ -110,7 +110,7 @@ struct __res_state {
struct sockaddr_in
nsaddr_list[MAXNS]; /* address of name server */
#define nsaddr nsaddr_list[0] /* for backward compatibility */
- u_short id; /* current packet id */
+ u_short id; /* current message id */
char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
char defdname[256]; /* default domain (deprecated) */
u_long pfcode; /* RES_PRF_ flags - see below. */
@@ -235,6 +235,7 @@ extern const struct res_sym __p_type_syms[];
#define res_isourserver __res_isourserver
#define res_nameinquery __res_nameinquery
#define res_queriesmatch __res_queriesmatch
+#define res_close __res_close
__BEGIN_DECLS
int res_hnok __P((const char *));
int res_ownok __P((const char *));
@@ -272,7 +273,7 @@ int dn_comp __P((const char *, u_char *, int,
int dn_expand __P((const u_char *, const u_char *, const u_char *,
char *, int));
int res_init __P((void));
-u_int16_t res_randomid __P((void));
+u_int res_randomid __P((void));
int res_query __P((const char *, int, int, u_char *, int));
int res_search __P((const char *, int, int, u_char *, int));
int res_querydomain __P((const char *, const char *, int, int,
@@ -285,6 +286,7 @@ int res_nameinquery __P((const char *, int, int,
const u_char *, const u_char *));
int res_queriesmatch __P((const u_char *, const u_char *,
const u_char *, const u_char *));
+void res_close __P((void));
__END_DECLS
#endif /* !_RESOLV_H_ */