[Date Prev][Date Next]
Re: (ITS#3704) slapd: socket problem using gcc elf-64
> Full_Name: Andrea Migliore
> Version: 2.2.15 - 2.2.24
> OS: hp-ux 11.11 and 11.23
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (220.127.116.11)
> compiling openldap 2.2.15 or 2.2.24 on hp-ux 11.11 or 11.23 on pa-risc cpu
> using gcc/pa-risc 2.0 all it's ok.
> But using gcc/elf-64 slapd cannot accept connection.
> With tusc ( truss,strace etc.. ) it seems that in source slapd/daemon.c
> s = accept( slap_listeners[l]->sl_sd,(struct sockaddr *) &from, &len );
> return ok ( s=9 ) but doesn't fill "from".
> when switch test from.sa_addr.sa_family results 0 ( UNDEFINED )
> so socket is closed ( slapd_close(s);).
I've noticed a similar behavior in other implementations when the last
argument of accept(2), the size of the second argument (struct sockaddr),
isn't large enough or even exactly of the right size. Can you tell the
size of the (struct sockaddr_in) on your architecture, compare it to the
value that is passed as last argument to accept(2) in daemon.c, and see if
passing the exact size you can have the "from" filled as expected?
SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497