On Mon, Jul 22, 2013 at 4:38 PM, Ado Dao <ado...@hotmail.de> wrote: > When I search anonymous, e.g. with MS Outlook or so > > ldapsearch -h <host> -p 389 -x -b "dc=foo,dc=com" "mail=t...@mail.loc" > > IOSession is null > > with authentication > > ldapsearch -h <host> -p 389 -w secret -D "uid=admin,ou=system" -x -b > "dc=foo,dc=com" "mail=t...@mail.loc" > > IOSession is != null > > you are right, in anonymous case we are not storing the IoSession in the CoreSession
> > I Used the embedded sample from: > > https://svn.apache.org/repos/asf/directory/sandbox/kayyagari/embedded-sample-trunk/src/main/java/org/apache/directory/seserver/EmbeddedADSVerTrunk.java > > Is there any possibility to get the Client-IP address with anonymous bind. > > -- > Regards > Ado > > > > > > > Date: Sat, 20 Jul 2013 06:03:56 +0200 > > From: elecha...@gmail.com > > To: users@directory.apache.org > > Subject: Re: getClientAddress() does not provide remote connection info > for anonymous connections > > > > Le 7/20/13 2:22 AM, Ado Dao a écrit : > > > Hi Emmanuel, > > > thanks for your answer. > > > > > > From DefaultCoreSession.java: > > > ... > > > public SocketAddress getClientAddress() > > > { > > > if ( ioSession != null ) > > > { > > > return ioSession.getRemoteAddress(); > > > } else { > > > return null; > > > } > > > } > > > ... > > > > > > > > > In Anonymous Mode is the IOSession == null. Only in Authentication > Mode is the IOSession != null. > > > > You are doing a search without a bind, I guess ? > > > > > > -- > > Regards, > > Cordialement, > > Emmanuel Lécharny > > www.iktek.com > > > > -- Kiran Ayyagari http://keydap.com