From daniel.le@exfo.com Tue May 16 00:53:30 2017 From: daniel.le@exfo.com To: openldap-bugs@openldap.org Subject: Re: (ITS#8654) Option for LDAP client to bind to a local address. Date: Tue, 16 May 2017 00:53:28 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6986516120840902728==" --===============6986516120840902728== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit --_000_BC204A77E2E9CD4A85A8F600C7F0BA848C0F4476SPQCMBX01exfoco_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable For reference: https://msdn.microsoft.com/en-us/library/aa367019(v=3Dvs.85).aspx LDAP_OPT_SOCKET_BIND_ADDRESSES 0x44 Sets or retrieves a pointer to a TCHAR string containing a list of space-se= parated addresses to be used by socket bind. For a multihomed machine, use = this option to set a particular network interface address to be used for so= cket bind. Socket bind will be performed before socket connect for the serv= er address. See socket bind for more details. You should provide both IPv4 and IPv6 local addresses, if available, becaus= e both IPv4 and IPv6 server addresses can be used for socket connect. Socke= t bind will fail if there is an address family mismatch. On the Domain Cont= roller, for the default Server (HostName=3DNULL), loopback addresses will b= e used for socket connect. Set loopback addresses (for both IPv4 and IPv6) = for this option to work. This option can only be set before a connection is established. That is, ju= st after ldap_init. ------------------------------- I am not sure what "a list of space-separated addresses" exactly means. Per= haps one IPv4 IP address and one IPv6 address if both are available. My use= case is either a local IPv4 or IPv6 address. Daniel --_000_BC204A77E2E9CD4A85A8F600C7F0BA848C0F4476SPQCMBX01exfoco_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

For reference:

https://msdn.microsoft.com/en-us/library/aa367019(v= =3Dvs.85).aspx

 

LDAP_OPT_SOCKET_BIND_ADDRESSES

0x44

 

Sets or retrieves a pointer to a TCHAR string contai= ning a list of space-separated addresses to be used by socket bind. For a m= ultihomed machine, use this option to set a particular network interface ad= dress to be used for socket bind. Socket bind will be performed before socket connect for the server address= . See socket bind for more details.

 

You should provide both IPv4 and IPv6 local addresse= s, if available, because both IPv4 and IPv6 server addresses can be used fo= r socket connect. Socket bind will fail if there is an address family misma= tch. On the Domain Controller, for the default Server (HostName=3DNULL), loopback addresses will be used for = socket connect. Set loopback addresses (for both IPv4 and IPv6) for this op= tion to work.

 

This option can only be set before a connection is e= stablished. That is, just after ldap_init.

 

-------------------------------

I am not sure what "a list of space-separated a= ddresses" exactly means. Perhaps one IPv4 IP address and one IPv6 addr= ess if both are available. My use case is either a local IPv4 or IPv6 addre= ss.

 

Daniel

--_000_BC204A77E2E9CD4A85A8F600C7F0BA848C0F4476SPQCMBX01exfoco_-- --===============6986516120840902728==--