curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] curl: Support CURLOPT_LOCALADDR to bind to local address.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 13 Dec 2017 09:19:57 +0100 (CET)

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.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-12-13