Why do packets to 127.255.255.255 cause dial-up?

Tony Finch dot at dotat.at
Fri Mar 31 02:25:51 BST 2000


Nik Clayton <nik at freebsd.org> wrote:
> 
> Ah, indeed.  I hate it when I can't see the wood for the trees.  Nothing
> a quick
> 
>     route add -net 127 lo0
> 
> can't solve.  This then gives the expected:
> 
> Destination        Gateway            Flags     Refs     Use     Netif Expire
> default            158.152.1.222      UGSc       20      668     tun0
> 127                lo0                USc         0        0      lo0
> 127.0.0.1          127.0.0.1          UH          0        0      lo0
> [...]
> 
> lines.  And no packets wending their way down tun0 by mistake.
> 
> The more interesting question is why is this happening?

There is explicit code in the kernel code for ifconfig that says "Oh,
this is a loopback address so you don't want a network route." I had
to remove that in the NETALIAS patch (PR#12071) because the loopback
interface is where NETALIAS interfaces are usually configured :-)

Tony.
-- 
f.a.n.finch    fanf at demon.net    dot at dotat.at
278 shower from the clocktower




More information about the Ukfreebsd mailing list