diff --git a/lib/bind/configure.in b/lib/bind/configure.in index ee7a7f9ef9..c92aedaf7f 100644 --- a/lib/bind/configure.in +++ b/lib/bind/configure.in @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -AC_REVISION($Revision: 1.83.2.5.2.2 $) +AC_REVISION($Revision: 1.83.2.5.2.3 $) AC_INIT(resolv/herror.c) AC_PREREQ(2.13) @@ -526,6 +526,11 @@ AC_SUBST(WANT_IRS_THREADSGR_OBJS) AC_SUBST(WANT_IRS_THREADSPW_OBJS) AC_SUBST(WANT_IRS_THREADS_OBJS) +AC_CHECK_FUNC(if_nametoindex, + [USE_IFNAMELINKID="#define USE_IFNAMELINKID 1"], + [USE_IFNAMELINKID="#undef USE_IFNAMELINKID"]) +AC_SUBST(USE_IFNAMELINKID) + ISC_THREAD_DIR=$thread_dir AC_SUBST(ISC_THREAD_DIR) diff --git a/lib/bind/irs/getaddrinfo.c b/lib/bind/irs/getaddrinfo.c index 31a45367e7..291fba1646 100644 --- a/lib/bind/irs/getaddrinfo.c +++ b/lib/bind/irs/getaddrinfo.c @@ -1100,6 +1100,7 @@ ip6_str2scopeid(char *scope, struct sockaddr_in6 *sin6, */ scopeid = if_nametoindex(scope); if (scopeid == 0) + goto trynumeric; *scopeidp = scopeid; return (1); } diff --git a/lib/bind/port_after.h.in b/lib/bind/port_after.h.in index 9095982ec8..6d5f4dca66 100644 --- a/lib/bind/port_after.h.in +++ b/lib/bind/port_after.h.in @@ -26,6 +26,7 @@ @USE_SYSERROR_LIST@ @INNETGR_ARGS@ @SETNETGRENT_ARGS@ +@USE_IFNAMELINKID@ /* XXX sunos and cygwin needs O_NDELAY */ #define PORT_NONBLOCK O_NONBLOCK diff --git a/lib/bind/resolv/res_send.c b/lib/bind/resolv/res_send.c index 187270c1a1..81c2425892 100644 --- a/lib/bind/resolv/res_send.c +++ b/lib/bind/resolv/res_send.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.4 2004/06/03 04:40:16 marka Exp $"; +static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.5 2004/08/10 02:19:56 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -172,7 +172,8 @@ res_ourserver_p(const res_state statp, const struct sockaddr *sa) { if (srv6->sin6_family == in6p->sin6_family && srv6->sin6_port == in6p->sin6_port && #ifdef HAVE_SIN6_SCOPE_ID - srv6->sin6_scope_id == in6p->sin6_scope_id && + (srv6->sin6_scope_id == 0 || + srv6->sin6_scope_id == in6p->sin6_scope_id) && #endif (IN6_IS_ADDR_UNSPECIFIED(&srv6->sin6_addr) || IN6_ARE_ADDR_EQUAL(&srv6->sin6_addr, &in6p->sin6_addr)))