Messages in this thread | | | Subject | Re: [RFC] ip / ifconfig redesign | From | (Eric W. Biederman) | Date | Thu, 08 Dec 2005 03:15:51 -0700 |
| |
Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:
> On Fri, 2005-12-02 22:53:19 +0300, Al Boldi <a1426z@gawab.com> 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |