Jan-Benedict Glaw <[email protected]> writes:
> On Fri, 2005-12-02 22:53:19 +0300, Al Boldi <[email protected]> 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-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]