From owner-freebsd-chat Sat Apr 20 1:51:54 2002 Delivered-To: freebsd-chat@freebsd.org Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by hub.freebsd.org (Postfix) with ESMTP id 2A75537B400 for ; Sat, 20 Apr 2002 01:51:52 -0700 (PDT) Received: from pool0177.cvx21-bradley.dialup.earthlink.net ([209.179.192.177] helo=mindspring.com) by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #2) id 16yqaw-0005BO-00; Sat, 20 Apr 2002 01:51:47 -0700 Message-ID: <3CC12C03.D15864DB@mindspring.com> Date: Sat, 20 Apr 2002 01:51:15 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Brett Glass Cc: chat@freebsd.org Subject: Re: How to control address used by INADDR_ANY? References: <4.3.2.7.2.20020419144005.0358c610@nospam.lariat.org> <4.3.2.7.2.20020419154705.035aba50@nospam.lariat.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Brett Glass wrote: > At 03:15 PM 4/19/2002, Terry Lambert wrote: > >INADDR_ANY means "I don't care". FreeBSD's "I don't care" is a > >bit different in implementation than Cisco's "I don't care". 8-(. > > I think it really means, "I don't care, but I want it to work!" ;-) > > I don't think, for example, that the stack would pick an address > from an interface that was not up, or from a loopback interface > (more in my other message about this). No; it couldn't. That's an artifact of the routing code not returning a route to the source of the connection establishment (for inbound connections) or the interface capable of reaching the destination (for the outbound). > So, maybe what's needed is a "don't choose this one" flag.... If you are going to do something this God-Awful-Hackish(tm), then you should just use tun0, set the same IP ad on one of the externally routable interfaces, and then set the default route to go through the tunnel. It's fugly, but at this point it's pretty obvious that what you want is a working hack, not correct code. 8-|. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message