Re: [RFC] ip / ifconfig redesign

From: Eric W. Biederman
Date: Thu Dec 08 2005 - 05:17:38 EST


Jan-Benedict Glaw <jbglaw@xxxxxxxxxx> writes:

> On Fri, 2005-12-02 22:53:19 +0300, Al Boldi <a1426z@xxxxxxxxx> wrote:
>
>> The obvious benefit here, would be the transparent ability for apps to bind
>> to addresses, regardless of the link existence.
>
> # echo 1 > /proc/sys/net/ipv4/ip_nonlocal_bind
>
> and/or bind to address 0 (aka 0.0.0.0) instead of a given IP address.

Or equally:
int opt = 1;
setsockopt(fd, IPFREEBIND, &opt, sizeof(opt));
in your application.

It's cool the backwards compatibility is so good no one even
noticed it was implemented :)
And from the kernel source as to why this behaviour is not
the default.

/* Not specified by any standard per-se, however it breaks too
* many applications when removed. It is unfortunate since
* allowing applications to make a non-local bind solves
* several problems with systems using dynamic addressing.
* (ie. your servers still start up even if your ISDN link
* is temporarily down)
*/

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html