STEP 2, fixing dhclient behaviour with multiple interfaces

Robert Watson rwatson at freebsd.org
Tue Jul 29 07:25:18 PDT 2003


On Tue, 29 Jul 2003, Terry Lambert wrote:

> Martin Blapp wrote:
> > I't is my goal to make dhclient really functional, so it can not only
> > be used with one interface, but several.
> > 
> > On a well known OS this works just fine. A first interface gets
> > initialized and the GW gets set as usual. But if a second interface
> > gets added, and the first one is still active and has a working lease,
> > the GW will not be overwriten. If you remove now the first interface,
> > the default GW changes to the one of the second interface.
> [ ... ]
> > If there are other ideas, I'm open to them.
> 
> You could add kevents for interface arrival and departure, and add a
> kqueue to the dhcpd to catch the arrival/departure events, and then just
> act on them. 

Some of those events already exist for routing sockets, so in a worst case
scenario, you can hook up a routing socket to a kqueue :-).

Martin -- you might want to try the "route monitor" command sometime and
take a look at the vent stream there for things to consider.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org      Network Associates Laboratories




More information about the freebsd-current mailing list