PERFORCE change 138103 for review
Sam Leffler
sam at FreeBSD.org
Wed Mar 19 16:05:47 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=138103
Change 138103 by sam at sam_ebb on 2008/03/19 16:04:54
remove timeout on disassociate event; this causes us to
fallback on the normal event handler+state machine to
clear the lease which is what you'd get in wired case
Affected files ...
.. //depot/projects/vap/sbin/dhclient/dhclient.c#6 edit
Differences ...
==== //depot/projects/vap/sbin/dhclient/dhclient.c#6 (text+ko) ====
@@ -278,7 +278,11 @@
switch (ifan->ifan_what) {
case RTM_IEEE80211_ASSOC:
case RTM_IEEE80211_REASSOC:
- cancel_timeout(disassoc, ifi);
+ /*
+ * Use assoc/reassoc event to kick state machine
+ * in case we roam. Otherwise fall back to the
+ * normal state machine just like a wired network.
+ */
jev = (struct ieee80211_join_event *) &ifan[1];
if (memcmp(curbssid, jev->iev_addr, 6)) {
disassoc(ifi);
@@ -286,22 +290,6 @@
}
memcpy(curbssid, jev->iev_addr, 6);
break;
- case RTM_IEEE80211_DISASSOC:
- /*
- * Defer state change in case we are re-associating
- * to the same ap after a deauth (e.g. due to being
- * idle). We'll get an associate event and if we
- * roamed we'll handle it (see above). Otherwise we'll
- * eventually clear state. The only question is how
- * long to wait before doing this. Give it 45 seconds
- * as this should be plenty to scan multiple bands
- * and complete a WPA handshake. If this event is a
- * precursor to our being marked down or the interface
- * going away that'll be handled by the link state
- * change.
- */
- add_timeout(t+45, disassoc, ifi);
- break;
}
break;
default:
More information about the p4-projects
mailing list