Date: Thu, 2 Dec 2004 22:19:48 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 66279 for review Message-ID: <200412022219.iB2MJmbr011897@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=66279 Change 66279 by sam@sam_ebb on 2004/12/02 22:19:08 process associate/deassociate events for 802.11 devices and do the right thing Affected files ... .. //depot/projects/wifi/sbin/dhclient/dhclient.c#4 edit Differences ... ==== //depot/projects/wifi/sbin/dhclient/dhclient.c#4 (text+ko) ==== @@ -56,6 +56,8 @@ #include "dhcpd.h" #include "privsep.h" +#include <net80211/ieee80211_freebsd.h> + #ifndef _PATH_VAREMPTY #define _PATH_VAREMPTY "/var/empty" #endif @@ -240,6 +242,29 @@ ifan->ifan_index == ifi->index) goto die; break; + case RTM_IEEE80211: + ifan = (struct if_announcemsghdr *)rtm; + if (ifan->ifan_index != ifi->index) + break; + switch (ifan->ifan_what) { + case RTM_IEEE80211_ASSOC: + state_reboot(ifi); + break; + case RTM_IEEE80211_DISASSOC: + /* + * Clear existing state; transition to the init + * state and then wait for either a link down + * notification or an associate event. + */ + script_init("FAIL", NULL); + if (ifi->client->alias) + script_write_params("alias_", + ifi->client->alias); + script_go(); + ifi->client->state = S_INIT; + break; + } + break; default: break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412022219.iB2MJmbr011897>