From owner-freebsd-bugs Thu May 28 11:37:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA24702 for freebsd-bugs-outgoing; Thu, 28 May 1998 11:37:35 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from relay.ucb.crimea.ua (relay.ucb.crimea.ua [194.93.177.113]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA24533 for ; Thu, 28 May 1998 11:35:35 -0700 (PDT) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.8.8/8.8.8) id VAA23629; Thu, 28 May 1998 21:34:08 +0300 (EEST) (envelope-from ru) Message-ID: <19980528213408.B23509@ucb.crimea.ua> Date: Thu, 28 May 1998 21:34:08 +0300 From: Ruslan Ermilov To: Niall Smart , freebsd-bugs@FreeBSD.ORG Subject: Re: kern/6774: bind(3)/libc improvement Mail-Followup-To: Niall Smart , freebsd-bugs@FreeBSD.ORG References: <199805281150.EAA21797@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91i In-Reply-To: <199805281150.EAA21797@freefall.freebsd.org>; from Niall Smart on Thu, May 28, 1998 at 04:50:00AM -0700 X-Operating-System: FreeBSD 2.2.6-STABLE i386 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, May 28, 1998 at 04:50:00AM -0700, Niall Smart wrote: > > On May 27, 5:39pm, Leo Bicknell wrote: > } Subject: kern/6774: bind(3)/libc improvement > > > > >Synopsis: bind(3)/libc improvement > > > Many programs bind to "wildcard" addresses for the purposes of > > getting a local IP address/port assigment. This works fine when a > > machine has a single interface, but for machines with multiple physical > > or logical (alias) interfaces this is not always appropriate. For > > instance, on a machine with 10 aliases the "telnet" service, as managed > > by inetd(8) will respond to all 10 addresses. > > > > What I propose is an enviornment variable, "LOCAL_BIND" which > > would be used by the bind(3) code. If this does not exist, the > > traditional behavior would occur. On the other hand, if it was set to > > an IP address on the local system a "bind" call to the wildcard address > > would go to that address, and that address only. A further extension > > would be to have a list of acceptable addresses. > > I'm inclined to just say "what a gross hack". :) If a program should > have the ability to bind to specific addresses then the author of the > code should provide that functionality through command line arguments > or configuration files. There is currently no problem with the bind(2) > interface, the problem is in the programs which use it, and therefore > it's their behaviour which should be changed, not bind(2)'s > > Also, were you aware that even if a process has bound to a specific > interface, it can still receive packets recieved on other interfaces > destined for that interface? > > > This would allow things like an outbound telnet connection > > from a particular address forced by the user, or having a program like > > inetd listen only to some addresses without chaning the code of these > > user applications. > > Modifying inetd so it only binds to specific interfaces is probably > a good idea. AFAIK, inetd can do this using its ``-a'' option. -- Ruslan Ermilov System Administrator ru@ucb.crimea.ua United Commercial Bank +380-652-247647 Simferopol, Crimea 2426679 ICQ Network, UIN To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message