RE: dhclient/wpa_supplicant patch

From: Darren Pilgrim (dmp_at_bitfreak.org)
Date: 07/02/05

  • Next message: Suleiman Souhlal: "Re: panic: lockmgr: locking against myself"
    To: "'Brooks Davis'" <brooks@one-eyed-alien.net>
    Date: Fri, 1 Jul 2005 17:52:49 -0700
    
    

    > -----Original Message-----
    > From: Brooks Davis [mailto:brooks@one-eyed-alien.net]
    > Sent: Wednesday, June 29, 2005 10:08 PM
    > To: Brooks Davis
    > Cc: Darren Pilgrim; current@freebsd.org
    > Subject: Re: dhclient/wpa_supplicant patch
    >
    >
    > On Wed, Jun 29, 2005 at 12:23:38AM -0700, Brooks Davis wrote:
    > > On Tue, Jun 28, 2005 at 10:54:15PM -0700, Darren Pilgrim wrote:
    > > > From: Brooks Davis
    > > > >
    > > > > --- rc.d/wpa_supplicant Tue Jun 28 22:24:18 2005
    > > > > +++ rc.d/wpa_supplicant Tue Jun 28 18:51:32 2005
    > > > <...>
    > > > > +if ! wpaif $ifn; then
    > > > > + return 1
    > > > > +fi
    > > >
    > > > I think it would be better if the dhcpif/wpaif test is contained
    > > > within netif. It has to exist in netif because its job is to
    > > > determine how to configure the interface. The dhclient and
    > > > wpa_supplicant scripts should be "dumb" single-task scripts to
    > > > start/stop their respective clients.
    > > >
    > > > By putting the dhcpif/wpaif test in the dhclient/wpa_supplicant
    > > > scripts, not only is it redundant, it makes it impossible
    > to use the
    > > > scripts manually with an interface that isn't configured in
    > > > /etc/rc.conf with the DHCP or WPA magic words. Such manual
    > > > operations are useful in testing, temporary interfaces and custom
    > > > profile-based configurations where it's not possible/practical to
    > > > have a configuration line in /etc/rc.conf beforehand.
    > >
    > > Good point. The test is already in ifconfig_up/down so it's not
    > > needed in wpa_supplicant or dhclient.
    >
    > Upon further reflection, the wpa_supplicant case was removed
    > before commit, but I've kept the dhclient case because the
    > code to start a new dhclient via devd when link is detected
    > relies on rc.d/dhclient only working on appropriate
    > interfaces. An option to skip this test when called with
    > forcestart/forcestart seems like a reasionable compromise in
    > keeping with rc.subr's design. I don't have time to work
    > that out at the moment, but would be happy to look at patches.

    I have to wonder at the value of trying to start dhclient like that.
    Now that netif will operate on anything with an ifconfig line in
    /etc/rc.conf, is there any reason why having devd simply call `netif
    start $device-name` on attach wouldn't work?

    Either way, I'll provide patches.

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: Suleiman Souhlal: "Re: panic: lockmgr: locking against myself"

    Relevant Pages

    • Re: HEADSUP: OpenBSD dhclient incoming
      ... > event appears and devd starts dhclient on interface. ... The link state ...
      (freebsd-current)
    • Re: dhclient/wpa_supplicant patch
      ... It has to exist in netif because its job is to determine how to ... >> not only is it redundant, it makes it impossible to use the scripts ... > in wpa_supplicant or dhclient. ... dhclient via devd when link is detected relies on rc.d/dhclient only ...
      (freebsd-current)
    • Re: devd/devctl
      ... That functionality is being ported back to the vendor, ... If we want really cool whizbang features that are more specific ... You can't do it in devd. ... Make dhclient do one or the other. ...
      (freebsd-current)
    • Re: devd *NOT* called on wi0 insert?
      ... : the average laptop: one or more permanent interfaces and one or more ... The current devd is smart enough. ... : boot, it gets dhclient. ... don't use devd to work around that brain damage. ...
      (freebsd-current)
    • Re: devd/devctl
      ... > You can't do it in devd. ... > running dhclient about arrival/departures of interfaces ... sending a signal to dhclient. ... This is evil, and basically undoable with the current state of things, ...
      (freebsd-current)