pullup:
1676. [port] Solaris 8 has if_nametoindex().
1675. [bug] match any returned scope when a scope is not specified
on non global scope address in resolv.conf.
1674. [bug] getaddrinfo() failed to set sin6_scope_id correctly
on some platforms.
This commit is contained 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)
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user