From owner-freebsd-stable Tue Sep 25 17:22:34 2001 Delivered-To: freebsd-stable@freebsd.org Received: from nothing-going-on.demon.co.uk (pc-62-31-42-140-hy.blueyonder.co.uk [62.31.42.140]) by hub.freebsd.org (Postfix) with ESMTP id 1FC7437B403 for ; Tue, 25 Sep 2001 17:22:29 -0700 (PDT) Received: (from nik@localhost) by nothing-going-on.demon.co.uk (8.11.3/8.11.3) id f8Q0HtE46758; Wed, 26 Sep 2001 01:17:55 +0100 (BST) (envelope-from nik) Date: Wed, 26 Sep 2001 01:17:55 +0100 From: Nik Clayton To: Chris Cc: freebsd-stable@FreeBSD.ORG Subject: Re: 127/8 continued Message-ID: <20010926011755.N31744@clan.nothing-going-on.org> References: <20010924094048.X5906-100000@coredump.scriptkiddie.org> <3BB0A0A2.6CCC454B@chrisland.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="9v2bTOXBzuB5Piju" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3BB0A0A2.6CCC454B@chrisland.net>; from chris@chrisland.net on Tue, Sep 25, 2001 at 11:20:02PM +0800 Organization: FreeBSD Project Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --9v2bTOXBzuB5Piju Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 25, 2001 at 11:20:02PM +0800, Chris wrote: > Lamont Granquist wrote: > > On Mon, 24 Sep 2001, Joe Abley wrote: > > > Installing a null covering route for 127/8 with the blackhole bit > > > set seems a good way of preventing addresses with a destination > > > within 127/8 from being sent out on a non-loopback interface, without > > > resorting to nasty hacks which make address handling on the loopback > > > interface different to every other interface. It is also consistent > > > with the robustness principle. > > > > > > route add 127.0.0.0 -netmask 255.0.0.0 -iface lo0 -blackhole > >=20 > > It seems that 127.0.0.1 works when you do this, as do aliases that you = add > > to the lo0 interface. Works for me. >=20 > Isn't that when we configure an IP on an interface, it will > automatically create a route for the corresponding "connected" network? Ordinarily. > e.g: > # ifconfig xl0 inet 192.168.20.1 netmask 255.255.255.0 alias >=20 > Routing tables >=20 > Internet: > Destination Gateway Flags Refs Use Netif > Expire > 192.168.20 link#1 UC 0 0 xl0 =3D> >=20 > So for lo0, when we configure it as 127.0.0.1/8, there should be a > connected route of 127/8 pointing to lo0. But it is not there now. A > bug in... ifconfig? =20 No. src/sys/netinet/in.c explicitly doesn't do this if it's a loopback interface for some reason. No one's been able to explain why. N --=20 FreeBSD: The Power to Serve http://www.freebsd.org/ FreeBSD Documentation Project http://www.freebsd.org/docproj/ --- 15B8 3FFC DDB4 34B0 AA5F 94B7 93A8 0764 2C37 E375 --- --9v2bTOXBzuB5Piju Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjuxHrMACgkQk6gHZCw343U4lACeNMqrsGUPliKdRGDzMd1Cfxln fAkAnjahU9cs6cfcxZkVutHm5Lsw7JUL =OPjY -----END PGP SIGNATURE----- --9v2bTOXBzuB5Piju-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message