PERFORCE change 66279 for review

Sam Leffler sam at FreeBSD.org
Thu Dec 2 14:19:49 PST 2004


http://perforce.freebsd.org/chv.cgi?CH=66279

Change 66279 by sam at 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;
 	}


More information about the p4-projects mailing list