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 09:02:12AM -0700, David S. Miller wrote:
> Date: Thu, 19 Oct 2000 17:56:17 +0200
> From: Andi Kleen <ak@suse.de>
>
> 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
>
> I'll say it again, if you have to make changes to apps/servers the
> feature does not make any sense. It must operate transparently or
> not at all.

Why? Linux historically required always some changes to port programs
(e.g. UDP or accept error behaviour), one socket option more for some
very special cases is not too bad.

>
> Therefore for the case you mention, for now they live without
> non-local binds, period.

The other guy unfortunately did not describe how exactly the java
fails, so I cannot say what is worse.

>
> Otherwise it'll repeat the ip_dynaddr-breaks-bind desaster, which
> we're still chewing on.
>
> Andi, listen to what you propose, LD_PRELOAD hacks to force programs
> to set some magic socket option, and this is a real solution?

LD_PRELOAD for binary only programs, patches for free software.

>
> The current situation is one chooses between %100 anally compliant
> Java or truly dynamic address friendly bind(). :-)

Analy compliant java can use the setsockopt without LD_PRELOAD.

> 3) Does not require userland changes, such as adding setsockopt
> calls to applications or using equivalent LD_PRELOAD hacks.

I don't understand why (3) is such a big problem for you. It strikes
me as clean enough. You can still have the sysctl, just the application
should be able to overwrite it.


-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.089 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site