Date: Tue, 20 Jun 2000 20:17:34 +0000 From: Nik Clayton <nik@freebsd.org> To: net@freebsd.org Subject: No route for 127/8 to lo0 Message-ID: <20000620201733.A665@kilt.nothing-going-on.org>
next in thread | raw e-mail | index | archive | help
Chaps,
[ Not on -net, please cc: replies back to me ]
This is a continuation of a discussion I started on -hackers some time
ago (with the same subject line), but -net is probably the more appropriate
forum.
Why don't we automatically include a network route for 127/8 to lo0?
I first noticed this when I saw Samba repeatedly triggering a PPP
dialup.
It turns out Samba is sending occasional broadcasts to 127.255.255.255.
There's no route for that address on a 3.4/4.x system, so the packets
end up going out of the default route. This is bad for PPP systems (or
other systems that pay for outgoing traffic in some way).
RFC1122 says
[...]
(g) { 127, <any> }
Internal host loopback address. Addresses of this form
MUST NOT appear outside a host.
[...]
For most purposes, a datagram addressed to a broadcast or
multicast destination is processed as if it had been
addressed to one of the host's IP addresses;
Is there some special-case for 127/8 that's covered by the "For most
purposes" line?
If you look in src/sys/netinet/in.c:in_ifinit() (around line 700) you'll
see that IFF_LOOPBACK is special cased in the code to only add a host
route, rather than a network route, and it's been like that for about 15
years or so.
At the moment I just have a /usr/local/etc/rc.d/local-route.sh script
which runs
route add -net 127 -interface lo0
at startup. But it's a bit of a kludge. . .
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-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000620201733.A665>
