You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Joe Orton <jo...@manyfish.co.uk> on 2004/03/16 21:41:39 UTC

Re: getaddrinfo() on HP-UX 11i

Was the conclusion to this thread to not change APR?  There do seem to
be lots of 11i boxes "out there" which have got into the state where
getaddrinfo is found in libc but non-functional.

If Madhu says that getaddrinfo is first present in the base 11.23
release, I think it would be sensible to simply disable getaddrinfo on
pre-11.23 releases e.g. (untested):

--- build/apr_hints.m4	13 Mar 2004 00:32:43 -0000	1.60
+++ build/apr_hints.m4	16 Mar 2004 20:36:46 -0000
@@ -81,6 +81,12 @@
 	;;
     *-hp-hpux11.*)
 	APR_ADDTO(CPPFLAGS, [-DHPUX11 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED])
+        # pre-11.23 boxes sometimes have present but borked getaddrinfo
+        case `uname -r` in
+        *11.[01]*|*11.2[012]*)
+           APR_SETIFNULL(ac_cv_working_getaddrinfo, [no])
+           ;;
+        esac
 	;;
     *-hp-hpux10.*)
  	case $host in

	

Re: getaddrinfo() on HP-UX 11i

Posted by Jeff Trawick <tr...@attglobal.net>.
Spinka, Kristofer wrote:
> Has anyone tried to use getaddrinfo with the AI_V4MAPPED flag (perhaps even
> OR'd with AI_ALL) and the family set to AF_INET6?  From what I gleaned from
> a brief look at httpd, the consumer in question, it appears as though
> IPv4-mapped addressing is used in general.

I haven't tried AI_V4MAPPED in APR personally.  We want APR to return just an 
IPv4 address (sockaddr_in, not sockaddr_in6) if the host has no IPv6 mapping.

IPv4-mapped addresses have been necessarily used by httpd when there is a 
single IPv6 listening socket for a given port because the kernel has to pass it 
a mapped address when there is an IPv4 connection to that IPv6 listening socket.

But whether or not there is a single IPv6 listening socket for a given port 
which can handle IPv4+IPv6 depends upon which Apache release and your set of 
Listen directives and your platform.

> Looking through the CVS code for network_io/unix/sockaddr.c (1.43.2.4) from
> March 6th, it seems as though getaddrinfo is one of the few areas that
> wasn't properly upgraded to use v4 mapped addresses.  While the standard
> IPv4 API should work, HP-UX seems to prefer IPv6 everywhere (map v4's when
> needed).
> 
> Can you tell me how to reproduce this issue on 11.23, so I may verify this?

The issue I thought we were discussing is an HP-UX misinstallation resulting in 
a getaddrinfo() that can only resolve hosts listed in /etc/hosts.  I don't 
think you want to try to reproduce this ;)


RE: getaddrinfo() on HP-UX 11i

Posted by "Spinka, Kristofer" <ks...@style.net>.
Has anyone tried to use getaddrinfo with the AI_V4MAPPED flag (perhaps even
OR'd with AI_ALL) and the family set to AF_INET6?  From what I gleaned from
a brief look at httpd, the consumer in question, it appears as though
IPv4-mapped addressing is used in general.

Looking through the CVS code for network_io/unix/sockaddr.c (1.43.2.4) from
March 6th, it seems as though getaddrinfo is one of the few areas that
wasn't properly upgraded to use v4 mapped addresses.  While the standard
IPv4 API should work, HP-UX seems to prefer IPv6 everywhere (map v4's when
needed).

Can you tell me how to reproduce this issue on 11.23, so I may verify this?

  /kristofer

-----Original Message-----
From: Jeff Trawick [mailto:trawick@attglobal.net] 
Sent: Tuesday, March 16, 2004 1:19 PM
To: dev@apr.apache.org
Subject: Re: getaddrinfo() on HP-UX 11i

Joe Orton wrote:
> Was the conclusion to this thread to not change APR?  

I thought the conclusion was that "my" boxes were special ;)

> There do seem to
> be lots of 11i boxes "out there" which have got into the state where
> getaddrinfo is found in libc but non-functional.

hmmm...

> If Madhu says that getaddrinfo is first present in the base 11.23
> release, I think it would be sensible to simply disable getaddrinfo on
> pre-11.23 releases e.g. (untested):

sounds reasonable, but I'm curious about what the user would do if they
added 
the optional IPv6 support to one of these pre-11.23 releases and wanted apr
to 
support it



Re: getaddrinfo() on HP-UX 11i

Posted by Jeff Trawick <tr...@attglobal.net>.
Joe Orton wrote:
> Was the conclusion to this thread to not change APR?  

I thought the conclusion was that "my" boxes were special ;)

> There do seem to
> be lots of 11i boxes "out there" which have got into the state where
> getaddrinfo is found in libc but non-functional.

hmmm...

> If Madhu says that getaddrinfo is first present in the base 11.23
> release, I think it would be sensible to simply disable getaddrinfo on
> pre-11.23 releases e.g. (untested):

sounds reasonable, but I'm curious about what the user would do if they added 
the optional IPv6 support to one of these pre-11.23 releases and wanted apr to 
support it