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

RE: ITS#8654 - Option for LDAP client to bind to a local address



How does one check out code from the OpenLDAP master branch?

I don't know the telnet code but its manual about -b option refers to 'an' aliased address or to 'the' address, not multiple IPV4 or IPv6 addresses.

-b hostalias
Uses bind(2) on the local socket to bind it to an aliased address (see ifconfig(8) and the ''alias'' specifier) or to the address of another interface than the one naturally chosen by connect(2). This can be useful when connecting to services which use IP addresses for authentication and reconfiguration of the server is undesirable (or impossible).

Daniel

-----Original Message-----
From: Quanah Gibson-Mount [mailto:quanah@symas.com] 
Sent: Tuesday, May 23, 2017 11:32 AM
To: Daniel Le <daniel.le@exfo.com>; 'Howard Chu' <hyc@symas.com>; 'openldap-devel@openldap.org' <openldap-devel@openldap.org>
Subject: RE: ITS#8654 - Option for LDAP client to bind to a local address

--On Tuesday, May 23, 2017 4:18 PM +0000 Daniel Le <daniel.le@exfo.com>
wrote:

> Since the ITS#4707 patch was not merged into 2.4 and is subject to 
> additional modification to handle a list of local addresses, perhaps 
> it makes sense to leverage from what was done in 2.3 and write a new 
> patch for 2.4 (i.e. no merge)?

All work should be done against OpenLDAP master rather than a release branch

> Regarding multiple local IP addresses, I can think of a scenario where 
> the desired local network interface has an IPv4 address and an IPv6 
> address, then the one which has the same address family as the 
> server's is chosen at the time of socket binding, but how to match a 
> client IP address with a server host address when there are multiple 
> IPv4 and/or
> IPv6 local addresses?

Curious, does telnet -b handle this currently?

> Daniel
>
> -----Original Message-----
> From: Daniel Le
> Sent: Monday, May 22, 2017 5:17 PM
> To: 'Howard Chu' <hyc@symas.com>; Quanah Gibson-Mount 
> <quanah@symas.com>; 'openldap-devel@openldap.org' <openldap-devel@openldap.org> Subject: RE:
> ITS#8654 - Option for LDAP client to bind to a local address
>
> From what I can see, ldap_init_fd() only allows the setting of 
> UDP/TCP/IPC protocol type and server's URI.
>
> Will the ITS#4707 patch
> (ftp://ftp.openldap.org/incoming/openldap-2.3.27-bindaddr.patch.txt) 
> be merged into 2.4?
>
> And since this patch only handles one IP address, further change will 
> be necessary to support a list of IP addresses.
>
> Daniel
>
> -----Original Message-----
> From: Howard Chu [mailto:hyc@symas.com]
> Sent: Monday, May 22, 2017 2:49 PM
> To: Quanah Gibson-Mount <quanah@symas.com>; Daniel Le 
> <daniel.le@exfo.com>; 'openldap-devel@openldap.org'
> <openldap-devel@openldap.org> Subject: Re: ITS#8654 - Option for LDAP 
> client to bind to a local address
>
> Quanah Gibson-Mount wrote:
>> --On Monday, May 22, 2017 7:28 PM +0000 Daniel Le 
>> <daniel.le@exfo.com>
>> wrote:
>>
>>> I tumbled into the following ITS#4707 thread:
>>> Patch: option to bind client socket to an address
>>> https://www.openldap.org/lists/openldap-bugs/200610/threads.html#000
>>> 4
>>> 7
>>>
>>> Wasn't this patch integrated into OpenLDAP 2.3.X? I couldn't see it 
>>> in the 2.4.44 code base.
>>
>> The notes say it was added for 2.4, but that apparently is incorrect.
>>
>> "new API added in HEAD/RE24"
>
> The notes say *a* new API was added to 2.4, not necessarily *this* one.
> And that is true, we added ldap_init_fd() which lets the caller setup 
> their socket any way they please.
>
> commit 1f635b8bcfaaac666005a88a5620e9798c9565e1
>
> --
>    -- Howard Chu
>    CTO, Symas Corp.           http://www.symas.com
>    Director, Highland Sun     http://highlandsun.com/hyc/
>    Chief Architect, OpenLDAP  http://www.openldap.org/project/



--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>