Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: wpa_supplicant before dhcpcd



On Sat, 2008-08-23 at 09:39 +1000, Daniel Carosone wrote:
> Why can you have only one instance?  Because dhclient has a control
> socket, and multiple instances started using the same default socket
> collide. 
> 
> Why does dhclient have a control socket?  So that the running instance
> can have changes made to it, like adding and removing interfaces,
> releasing and restarting leases, etc.

I can't see anything in the omshell manpage about adding/removing
interfaces from a running dhclient. Are you sure this can be done?
IIRC, the real reason only one client can be run is because they all
want to bind a UDP port to INADDR_ANY which BSD only allows one instance
of due to the lack of the SO_BINDTODEVICE ioctl.

However, this has prompted a TODO list for dhcpcd.

1) Multiple interface support (done)
2) Detect wireless interface (done)
3) Control socket to release leases
4) OS support for detecting new/removed interfaces
5) Control socket for adding/removing interfaces if no wish for dynamic
OS support
6) Ensure that preferred interfaces get the routing and configuration
(default wired over wireless, then if_nametoindex - will be
configurable)

Multiple interface support has actually prompted a big code change to
the client state engine, moving to a proper event loop (no, not
libevent). This should make the long term goal of DHCPv6 support much
easier.

When 6) is finally done, you can have dhcpcd on two interfaces. The one
with the lowest metric will get the default route. If this interface
goes down (lease expires, no carrier, etc) then the other interface will
automatically redo its routing so that a new default route will appear.
This should make switching between wireless and wired networks on a
laptop quite trivial.

Thanks

Roy



Home | Main Index | Thread Index | Old Index