Subject: Re: PPPoE doesn't auto-add interface route
To: Rick Byers <rb-netbsd@BigScaryChildren.net>
From: Martin Husemann <martin@duskware.de>
List: current-users
Date: 12/09/2001 23:01:12
> The in-kernel PPPoE doesn't appear to automatically add a route to
> localhost for the interface address like other interfaces do.

This confused me for a moment, as I couldn't see anything the pppoe code is
not doing that it is supposed to do. With some pointers from Matt Thomas
I found this "automagically add a route to the local address via the first
configured loopback interface" happens via the ARP code for ethernet, arcnet
and probably fddi interfaces (which all do (indirectly) call arp_ifinit).

It does not happen for other interface types.

Try setting up a standard ppp connection via pppd(8) and the ppp0 interface:
you won't get a default route to the local endpoint.

> But what about people with dynamic IPs?

They probably most of the time do not care, as they don't bind any services
to this P2P endpoint but use NAT and bind to the internal addresses.

You can add the route manually via the ip-up script.

(see ifwatchd(8) or wait one or two days for the missing pppoe(8) man page
and /etc/rc.d/ifwatchd)

I have no clue if we should add this (and how) to all not yet covered 
interfaces. Calling arp_ifinit for an interface without LLADDR does not
look like the right thing to do.


Martin