lkml.org 
[lkml]   [2000]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: bind() allowed to non-local addresses
On Thu, Oct 19, 2000 at 08:17:28AM -0700, David S. Miller wrote:
> Date: Thu, 19 Oct 2000 09:23:26 -0600
> From: Matt Peterson <mpeterson@calderasystems.com>
>
> Have you thought about an SOL_SOCKET level socket option? It might
> be more intuitive for programmers than an ioctl and could be
> documented with sockets where it will be used.
>
> Where did I say "ioctl"?
>
> The solution I am implementing is neither a socket option nor an
> ioctl, it's a system-wide sysctl.
>
> If people need to change code in applications to get the "servers
> start even when dynamic address is temporarily down" behavior, the
> feature makes no sense. The whole point was to make it totally
> transparent to the apps.
>
> This is why a sysctl is how I am allowing the new behavior. A person
> will be able to go:
>
> ! echo "1" >/proc/sys/ipv4/ip_nonlocal_bind
>
> and be done with it. And like I said it will be "0" by default,
> thus giving the 2.2.x behavior.

It would be better if there was at least an socket option to overwrite
the sysctl. What happens when you need both behaviours on the same box
in different applications ? (e.g. a dynamic IP box running java and servers)
With an socket option you could at least use LD_PRELOAD for socket() or even
fix the programs

Otherwise it'll repeat the ip_dynaddr-breaks-bind desaster, which we're
still chewing on.


-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.158 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site