1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-14 07:43:06 +00:00

- Fix hostname resolution if IPv4 are mapped. [1]

- Add WITHOUT_V4MAPPED knob and explicitly set --disable-v4-mapped
  if WITHOUT_V4MAPPED or WITH_IPV6_V6ONLY

Also submitted by:	Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp> [1]
This commit is contained in:
Clement Laforet 2004-07-13 09:32:44 +00:00
parent e2ca6bea49
commit be548a19b6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=113536
6 changed files with 30 additions and 2 deletions

View File

@ -77,7 +77,9 @@ WITH_HTTP_PORT?= 80
.if defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= --disable-ipv6
.elif !defined(WITH_IPV6_V6ONLY)
.elif defined(WITH_IPV6_V6ONLY) && defined(WITHOUT_V4MAPPED)
CONFIGURE_ARGS+= --disable-v4-mapped
.else
CONFIGURE_ARGS+= --enable-v4-mapped
.endif

View File

@ -23,6 +23,8 @@
## WITHOUT_AUTH: Disable auth modules
## WITH_CUSTOM_AUTH: Let you choose which auth modules you wish
## WITHOUT_DAV: Disable DAV support
## WITHOUT_IPV6: Disable IPv6 support
## WITHOUT_V4MAPPED
## WITH_IPV6_V6ONLY: Don't allow IPv6 sockets to handle IPv4
## connections
## WITHOUT_SSL: Disable SSL support

View File

@ -0,0 +1,10 @@
--- srclib/apr/network_io/unix/sockaddr.c.orig Tue Jul 13 09:08:03 2004
+++ srclib/apr/network_io/unix/sockaddr.c Tue Jul 13 09:08:46 2004
@@ -612,6 +612,7 @@
struct sockaddr_in tmpsa;
tmpsa.sin_family = AF_INET;
tmpsa.sin_addr.s_addr = ((apr_uint32_t *)sockaddr->ipaddr_ptr)[3];
+ tmpsa.sin_len = sizeof(tmpsa);
rc = getnameinfo((const struct sockaddr *)&tmpsa, sizeof(tmpsa),
tmphostname, sizeof(tmphostname), NULL, 0,

View File

@ -77,7 +77,9 @@ WITH_HTTP_PORT?= 80
.if defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= --disable-ipv6
.elif !defined(WITH_IPV6_V6ONLY)
.elif defined(WITH_IPV6_V6ONLY) && defined(WITHOUT_V4MAPPED)
CONFIGURE_ARGS+= --disable-v4-mapped
.else
CONFIGURE_ARGS+= --enable-v4-mapped
.endif

View File

@ -23,6 +23,8 @@
## WITHOUT_AUTH: Disable auth modules
## WITH_CUSTOM_AUTH: Let you choose which auth modules you wish
## WITHOUT_DAV: Disable DAV support
## WITHOUT_IPV6: Disable IPv6 support
## WITHOUT_V4MAPPED
## WITH_IPV6_V6ONLY: Don't allow IPv6 sockets to handle IPv4
## connections
## WITHOUT_SSL: Disable SSL support

View File

@ -0,0 +1,10 @@
--- srclib/apr/network_io/unix/sockaddr.c.orig Tue Jul 13 09:08:03 2004
+++ srclib/apr/network_io/unix/sockaddr.c Tue Jul 13 09:08:46 2004
@@ -612,6 +612,7 @@
struct sockaddr_in tmpsa;
tmpsa.sin_family = AF_INET;
tmpsa.sin_addr.s_addr = ((apr_uint32_t *)sockaddr->ipaddr_ptr)[3];
+ tmpsa.sin_len = sizeof(tmpsa);
rc = getnameinfo((const struct sockaddr *)&tmpsa, sizeof(tmpsa),
tmphostname, sizeof(tmphostname), NULL, 0,