Support IP_FREEBIND

2014-03-03 Thread Sander Klein

Hi,

would it be possible to support IP_FREEBIND with HAProxy-1.5 on linux?

I'm asking because nonlocal_bind only works for IPv4 and it seems linux 
upstream does not want to support nonlocal_bind for IPv6.


A thread about this can be found here: 
http://comments.gmane.org/gmane.comp.web.haproxy/7317


Currently I'm binding IP's to a dummy interface so HAProxy can start, 
but this is starting to become a nightmare.


Greets,

Sander



Re: Support IP_FREEBIND

2014-03-03 Thread Sander Klein

On 03.03.2014 14:45, Sander Klein wrote:

Hi,

would it be possible to support IP_FREEBIND with HAProxy-1.5 on linux?

I'm asking because nonlocal_bind only works for IPv4 and it seems
linux upstream does not want to support nonlocal_bind for IPv6.

A thread about this can be found here:
http://comments.gmane.org/gmane.comp.web.haproxy/7317

Currently I'm binding IP's to a dummy interface so HAProxy can start,
but this is starting to become a nightmare.


Replying to myself... I'm probably looking for the 'transparant' option. 
Looking at the docs it seems to do what I want...


Greets,

Sander



RE: Support IP_FREEBIND

2014-03-03 Thread Lukas Tribus
Hi,


 On 03.03.2014 14:45, Sander Klein wrote:
 Hi,

 would it be possible to support IP_FREEBIND with HAProxy-1.5 on linux?

 I'm asking because nonlocal_bind only works for IPv4 and it seems
 linux upstream does not want to support nonlocal_bind for IPv6.

 A thread about this can be found here:
 http://comments.gmane.org/gmane.comp.web.haproxy/7317

 Currently I'm binding IP's to a dummy interface so HAProxy can start,
 but this is starting to become a nightmare.

 Replying to myself... I'm probably looking for the 'transparant' option.
 Looking at the docs it seems to do what I want...

Yes, the transparent option sets IPV6_TRANSPARENT on IPv6 sockets, which
should achieve this.

Please let us know if this works for you; we do IP_FREEBIND only on IPv4,
not on IPv6.

Also, be advised that this is not supported on ancient kernels, support
for those things appeared in 2.6.37. You may want to use a 3.x kernel for
this.



Regards,

Lukas 


Re: Support IP_FREEBIND

2014-03-03 Thread Willy Tarreau
Hi Sander,

On Mon, Mar 03, 2014 at 04:01:12PM +0100, Lukas Tribus wrote:
 Hi,
 
 
  On 03.03.2014 14:45, Sander Klein wrote:
  Hi,
 
  would it be possible to support IP_FREEBIND with HAProxy-1.5 on linux?
 
  I'm asking because nonlocal_bind only works for IPv4 and it seems
  linux upstream does not want to support nonlocal_bind for IPv6.
 
  A thread about this can be found here:
  http://comments.gmane.org/gmane.comp.web.haproxy/7317
 
  Currently I'm binding IP's to a dummy interface so HAProxy can start,
  but this is starting to become a nightmare.
 
  Replying to myself... I'm probably looking for the 'transparant' option.
  Looking at the docs it seems to do what I want...
 
 Yes, the transparent option sets IPV6_TRANSPARENT on IPv6 sockets, which
 should achieve this.
 
 Please let us know if this works for you; we do IP_FREEBIND only on IPv4,
 not on IPv6.
 
 Also, be advised that this is not supported on ancient kernels, support
 for those things appeared in 2.6.37. You may want to use a 3.x kernel for
 this.

Please test the snapshot from this morning, it contains Lukas' patch.

Willy