HAL 0.5.x & networking

Dan Williams dcbw at redhat.com
Wed Jun 8 07:57:52 PDT 2005


On Wed, 8 Jun 2005, Sean Meiners wrote:

> Thanks for the fast response!
> 
> On Jun 8, 2005, at 7:27 AM, David Zeuthen wrote:
> 
> > On Wed, 2005-06-08 at 07:20 -0700, Sean Meiners wrote:
> >
> >> I've been investigating HAL and decided to look at the latest release
> >> (0.5.2) and noticed it no longer seems to monitor network devices as
> >> the 0.4.x series did.  Specifically, no events were generated when
> >> the network cable was unplugged, or the interface was brought up or
> >> down.  I was wondering if this was intentionally removed?
> >>
> >
> > It was intentionally removed - too many bad drivers caused the  
> > system to
> > lock up and it was just painful to support. The thinking was that it's
> > equally easy for applications using HAL to do themselves. You should
> > still get a HAL event when the interface is brought up and down but  
> > I'm
> > not sure how useful that is..
> 
> Speaking of bad drivers, I noticed that non-PCI PCMCIA and USB  
> network devices won't currently show up in HAL.  I tracked it down to  
> the fact that net_add specifically looks for /sys/class/net/<if>/ 
> device and if it fails to find it, gives up.  Unfortunately, drivers  
> like airo don't provide device symlinks.  I created a patch to remove  
> this restriction and the devices show up, but with no parents (as  
> would be expected).  I'd be happy to send it along as well as  
> entertain other ideas of how to resolve the issue.

The idea here is to get drivers _fixed_.  Its a one-line fix, and recent kernels 
should have all in-kernel PCMCIA drivers fixed to use SET_NETDEV_DEV.  I've 
submitted patches for drivers like the atmel one to do this.  In 2.6.11.8, the 
airo driver has SET_NETDEV_DEV on line 2763 in the _init_airo_card() function, 
so it should be OK.  If its not in your kernel, patch it.

HAL usually will not tolerate drivers that don't use sysfs correctly, and the 
response is usually "fix the driver" rather than removing these checks from HAL.  
This does mean that kernels < 2.6.10 may not have little fixes like this.  So 
be it.

> > That's exactly what NetworkManager
> >
> >  http://people.redhat.com/dcbw/NetworkManager/
> >
> > is about - have you seen it? There's really a lot of gotchas that Dan
> > Williams had to deal with along the way but it's coming along rather
> > nicely (a few months back VPN support was added) - we're always  
> > looking
> > for more hackers (I think Dan got a TODO list) :-)
> 
> I looked at it a few months back and it looks nice.  The only problem  
> I had was that it does *everything* itself.  And since we're Debian  
> based I prefer to use the rather nice if(up|down) system that's  
> already available to do most of the work since so many other things  
> (pppd, resolvconf, etc) have been made to work very well with it.   
> However, I've been planning on giving NetworkManager a second look to  
> see where it's at now.

The general trend in NetworkManager land is to use external daemons now.  With 
the instance of DHCP client built in, there was no DBUS-enabled version of any 
dhcp client.  However, NetworkManager HEAD now uses dhcdbd.  See

http://mail.gnome.org/archives/networkmanager-list/2005-June/msg00014.html

for more information.  It also requires some patches to dhclient and 
dhclient-script which I believe Debian has already incorporated.

Next up is named.  NetworkManager will no longer spawn its own caching 
nameserver, and instead will depend on an already-running one that is started as 
a system service.  Jason Vas Dias is making named DBUS-aware as he did with 
dhcdbd/dhclient.

After that, we'll be using wpa_supplicant as an external daemon to handle 
advanced authentication like LEAP/EAP/CHAP/PAP/etc, and stuff like WPA.  
Possibly even delegate WEP and wireless scanning to it as well.

So the trend is to move that stuff out of NetworkManager and make other daemons 
dbus-aware.  Note that NetworkManager will still "manage" your network 
completely, but things like ppp, isdn, gprs, and bluetooth will be incorporated 
eventually.  Its really targeted at laptop/desktop users right now with the 
intention of gradually spreading out to a general network infrastructure daemon.

Dan
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list