apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bennett, Tony - CNF" <Bennett.T...@cnf.com>
Subject RE: apr_sockaddr_info_get() produces syslog messages on AIX
Date Thu, 30 Sep 2004 02:06:04 GMT
Jeff,

Here's my /etc/netsvc.conf:
	hosts=local=auth,bind4


I used this to prevent hitting on my DNS server for IPV6 Addresses
when we specify APR_UNSPEC, since we are not currently using IPV6
addresses ...but they are planning for them now.


We do not have a nsswitch.conf file.


Here's a stub program that causes the syslog message:
	#include <stdio.h>
	#include <stddef.h>
	#include <sys/socket.h>
	#include <sys/param.h>
	#include <netdb.h>

	char buf[MAXHOSTNAMELEN+1];
	int
	main(int argc, char **argv)
	{
	    struct addrinfo hints;
	    struct addrinfo *ai_list;
	    int rc;

	    gethostname(buf, sizeof(buf)-1);

	    memset(&hints, 0, sizeof(hints));
	    hints.ai_family    = AF_UNSPEC;
	    hints.ai_socktype  = SOCK_STREAM;
	    rc = getaddrinfo (buf, NULL, &hints, &ai_list);
	    printf("rc=%d\n", rc);
	}

Thanks,
-tony

-----Original Message-----
From: Jeff Trawick [mailto:trawick@gmail.com] 
Sent: Wednesday, September 29, 2004 6:41 PM
To: dev@apr.apache.org
Subject: Re: apr_sockaddr_info_get() produces syslog messages on AIX

On Wed, 29 Sep 2004 20:18:36 -0400, Jeff Trawick <trawick@gmail.com>
wrote:
> On Wed, 29 Sep 2004 14:55:40 -0700, Bennett, Tony - CNF 
> <bennett.tony@cnf.com> wrote:
> > Note: I posted a similar question on comp.unix.aix
> >
> > Platform: Aix 5.1
> >
> > We are using Apache 2.0.42.  We have written a module which calls 
> > apr_sockaddr_info_get() which, in turn, performs a getaddrinfo() 
> > call.
> >
> > Every call by Apache to getaddrinfo() generates the following syslog

> > message:
> >     "The user option is different from the address family passed 
> > into the API."
> 
> that string appears in /usr/lib/libc.a several times
> 
> >
> > Here are the arguments passed by apr_sockaddr_info_get() to
> > getaddrinfo():
> 
> looks reasonable
> 
> >   hostname:   "my.fullyqualified.host.com"
> >   servername: NULL
> 
> hmm, I thought we would make sure that servername points to something 
> on AIX to work around some bogosity
> 
> > My questions are:
> >     - Why is this happening...?
> >     - What can I do to stop it..?
> 
> create a 15-20 line standalone program which calls getaddrinfo() in 
> the same manner and exhibits the behavior, and call IBM support and 
> get them to tell you what has to change (patch libc, change program,
> whatever) to make getaddrinfo keep quiet when you run your program

if you want, send the simple test program to me and I'll try it on my
maintenance level of 5.1 first...

]$ lslpp -l bos.rte.libc
  Fileset                      Level  State      Description
 
------------------------------------------------------------------------
----
Path: /usr/lib/objrepos
  bos.rte.libc              5.1.0.59  COMMITTED  libc Library

The resolver stuff can behave differently based on the configuration
(files, dns, other).  It would be good to know what nsswitch.conf or
NSORDER setting is required to encounter the issue on your box.

Mime
View raw message