[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: daemon: getaddrinfo failed: invalid flags

> On Friday 30 January 2004 15:25, Mike O'Rourke wrote:
> > IIRC, when I compiled 2.1.24 on Solaris 9, I needed to change slightly
> > servers/slapd/daemon.c to pass a corrected "hints" structure. A patch is
> > attached for this. I can not recall exactly at which point mine failed
> > during compile or testing, but I _think_ it was during testing like
> > yours. In the patch, I moved the ai_socktype down one line to line up
> > with Sun's definition of hints -- just my own anal-retentive preference,
> > but the added ai_protocol is necessary!
> Changing the order of setting these structure elements are set should not
> affect the result.
> Explicitely having to set ai_protocol to 0 after having set the whole
> structure to \0 is really interesting. Don't Sun systems encode the integer 0
> as a sequence of \0 bytes ?

I use Solaris 9 and pretty much all recent openldap releases (2.1 and 2.2)
compile and run "out of box" for me.

Thanks for all the input so far - apolgies about the intial input, I'm using 2.2.5 - I need the syncrep and the latest version seemed appropriate.

I'll try out the ai_socktype mod tomorrow when I'm back at the office, but one thing I discoved last thing on Firday night was that if broke the connection to the nearest dns server, openldap worked fine. I then ran a snoop and discovered that, because we're using NAT, the openldap server is asking the dns server for an unknown address - ie the localhost, which has been expanded to the full (hidden) expanded hostname, which in turn throws up a whole load of errors. Strange - I didn't have this problem with openldap 2.1

Perhaps there is an option for using a built in getaddrinfo in openldap instead of the solaris/gcc one.


Find a cheaper internet access deal - choose one to suit you. http://www.msn.co.uk/internetaccess