curl-library
Re: [PATCH] curl: Support CURLOPT_LOCALADDR to bind to local address.
Date: Tue, 30 Jan 2018 13:22:17 -0800
On 12/13/2017 12:19 AM, Daniel Stenberg wrote:
> On Thu, 9 Nov 2017, greearb_at_candelatech.com wrote:
>
> Hi Ben!
>
>> This allows a user to bind to both an interface (with CURLOPT_INTERFACE) and a local IP address. In doing so, it allows the user to work-around some serious
>> performance issues on machines with lots of virtual interfaces because curl no longer has to scan all interfaces each time it makes a connection.
>
> This patch has clearly been neglected by me, and while I'm not quite ready to take it on just yet[*] I wanted to ask if you could consider pushing this to
> github as a PR?
>
> That way we'd get it tested and verified much better before merge, and it also helps out to tell us when it starts to get merge confliects (and it makes it
> harder for us/me to forget it). Like it does now: the changes in lib/connect.c needs a rebase/edit to apply on current git master.
>
> Further: I would like to get a clearer view on what exactly CURLOPT_LOCALADDR provides and offers that CURLOPT_INTERFACE prefixed with "host!" doesn't do? And
> if so, can't we instead make CURLOPT_INTERFACE use that? Or perhaps even add another prefix for CURLOPT_INTERFACE if it truly has to be different. To me, this
> feels like adding an entirely new easy option for a very minor variation of an already existing option.
>
> [*] = I'll take off on an extended vacation now for a few weeks ahead so I personally won't work on anything larger until I get back.
Hello,
I just rebased, and here is the (untested) patch again. I'll be testing this, but since my normal
use case is pretty specific, and there were some tricky conflicts in the connect.c code,
it could use some other testing as well....
Thanks,
Ben
-- Ben Greear <greearb_at_candelatech.com> Candela Technologies Inc http://www.candelatech.comReceived on 2018-01-30