From owner-freebsd-hackers Fri Apr 21 12: 6:24 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from nothing-going-on.demon.co.uk (nothing-going-on.demon.co.uk [193.237.89.66]) by hub.freebsd.org (Postfix) with ESMTP id 842C937BDD4; Fri, 21 Apr 2000 12:05:59 -0700 (PDT) (envelope-from nik@nothing-going-on.demon.co.uk) Received: (from nik@localhost) by nothing-going-on.demon.co.uk (8.9.3/8.9.3) id UAA36692; Fri, 21 Apr 2000 20:02:02 +0100 (BST) (envelope-from nik) Date: Fri, 21 Apr 2000 20:02:01 +0100 From: Nik Clayton To: Nik Clayton Cc: hackers@freebsd.org Subject: Re: No route for 127/8 to lo0 (?) Message-ID: <20000421200201.A34984@catkin.nothing-going-on.org> References: <20000331125739.A97865@catkin.nothing-going-on.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20000331125739.A97865@catkin.nothing-going-on.org>; from nik@freebsd.org on Fri, Mar 31, 2000 at 12:57:40PM +0100 Organization: FreeBSD Project Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Mar 31, 2000 at 12:57:40PM +0100, Nik Clayton wrote: > In the course of debugging why Samba was bringing my modem link up > periodically, I discovered it was sending netbios packets to > 127.255.255.255. Because the relevent entries from the routing table > looked like > > Destination Gateway Flags Refs Use Netif Expire > default 158.152.1.222 UGSc 22 0 tun0 > 127.0.0.1 127.0.0.1 UH 0 201 lo0 > [...] > > 127.255.255.255 was going out of the default route, tun0, and bringing > the line up. [...] > I thought that 127/8 was the "local net", and that packets sent to any of > those addresses would go via the loopback interface. That seems to be > how Linux and Windows 98 do things (the only systems I can check this on > at the moment). Assuming that's the case, why does FreeBSD only add a > a host route to 127.0.0.1, and not a network route for 127/8? Various > other people have confirmed that they only have a 127.0.0.1 host route > as well, so I don't believe this is a misconfiguration of my system. No one's actually been able to answer this, save a few comments that the loopback interface is special-cased to do this in the code, and that the code in question is quite old. In light of that, I'd like to commit: Index: rc.network =================================================================== RCS file: /home/ncvs/src/etc/rc.network,v retrieving revision 1.74 diff -u -r1.74 rc.network --- rc.network 2000/02/29 12:53:28 1.74 +++ rc.network 2000/04/21 18:48:15 @@ -254,6 +254,9 @@ done fi + # 127/8 goes through lo0. + route add -net 127 -interface lo0 + echo -n 'Additional routing options:' case ${tcp_extensions} in [Yy][Ee][Ss] | '') as a stop gap. FWIW, the code in question is sys/netinet/in.c:in_ifinit(), around line 701. Comments? N -- Internet connection, $19.95 a month. Computer, $799.95. Modem, $149.95. Telephone line, $24.95 a month. Software, free. USENET transmission, hundreds if not thousands of dollars. Thinking before posting, priceless. Somethings in life you can't buy. For everything else, there's MasterCard. -- Graham Reed, in the Scary Devil Monastery To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message