Vincent Bernat | 17 Dec 11:52 2011

Re: nonlocal_bind and IPv6

OoO Pendant  le repas  du vendredi 16  décembre 2011, vers  19:18, David
Miller <davem <at> davemloft.net> disait :

>> Moreover, I am just adding the IPv6 version of this setting. The IPv4
>> version already exists.

> I don't think the ipv4 feature was a wise thing to add, so just because
> ipv4 has something doesn't automatically make it appropriate to support
> it in ipv6 too.  So please don't use arguments like that.

Here are my arguments against using IP_FREEBIND:
 1. It  needs to be applied to  all services, this will  take years. All
    services will need  an option just for that  (because usually a user
    does not want  to be able to bind  to a non local IP).  We could use
    some hacks with LD_PRELOAD, but that's just an hack.
 2. This option may just be unavailable because it is too low-level. For
    example, it is not available  in Python socket implementation (but I
    can  still  hardcode  the  numerical  value).  If  I  use  some  web
    framework, I will also have hard time to set this option.
 3. This is a Linux only option.

Here are the arguments for a sysctl:
 1. It  is  a system-wide  configuration:  you  configure  VRRP on  your
    system, you enable this sysctl, nothing else to do.
 2. This is essentially a one-line modification. This will be quite easy
    to maintain for years.
 3. This is the natural option for many people. See for example:
     http://thread.gmane.org/gmane.comp.web.haproxy/7317/focus=7318
 4. Without it, people just do horrible things:
     http://thread.gmane.org/gmane.comp.web.haproxy/7317/focus=7321

Did I convince you?
--

-- 
Vincent Bernat ☯ http://vincent.bernat.im

 /*
  * We used to try various strange things. Let's not.
  */
	2.2.16 /usr/src/linux/fs/buffer.c

Gmane