Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jan 2004 16:14:59 -0800 (PST)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 46026 for review
Message-ID:  <200401280014.i0S0ExII054109@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=46026

Change 46026 by sam@sam_ebb on 2004/01/27 16:14:46

	cleanup shared key authentication debug msgs (again)

Affected files ...

.. //depot/projects/netperf+sockets/sys/net80211/ieee80211_input.c#8 edit

Differences ...

==== //depot/projects/netperf+sockets/sys/net80211/ieee80211_input.c#8 (text+ko) ====

@@ -722,7 +722,7 @@
 		IEEE80211_SEND_MGMT(ic, ni,
 			IEEE80211_FC0_SUBTYPE_AUTH, seq + 1);
 		IEEE80211_DPRINTF(ic, IEEE80211_MSG_DEBUG | IEEE80211_MSG_AUTH,
-			("station %s %s authenticated\n",
+			("station %s %s authenticated (open)\n",
 			ether_sprintf(ni->ni_macaddr),
 			(allocbs ? "newly" : "already")));
 		break;
@@ -736,7 +736,7 @@
 		if (status != 0) {
 			IEEE80211_DPRINTF(ic,
 			    IEEE80211_MSG_DEBUG | IEEE80211_MSG_AUTH,
-			    ("authentication failed (reason %d) for %s\n",
+			    ("open authentication failed (reason %d) for %s\n",
 			    status,
 			    ether_sprintf(wh->i_addr3)));
 			if (ni != ic->ic_bss)
@@ -770,7 +770,7 @@
 	if (frm + 1 < efrm) {
 		if ((frm[1] + 2) > (efrm - frm)) {
 			IEEE80211_DPRINTF(ic, IEEE80211_MSG_AUTH,
-				("elt %d %d bytes too long\n",
+				("%s: elt %d %d bytes too long\n", __func__,
 				frm[0], (frm[1] + 2) - (efrm - frm)));
 			ic->ic_stats.is_rx_bad_auth++;
 			return;
@@ -841,6 +841,11 @@
 			for (i = IEEE80211_CHALLENGE_LEN / sizeof(u_int32_t);
 			     --i >= 0; )
 				ni->ni_challenge[i] = arc4random();
+			IEEE80211_DPRINTF(ic,
+				IEEE80211_MSG_DEBUG | IEEE80211_MSG_AUTH,
+				("shared key %sauth request from station %s\n",
+				ether_sprintf(ni->ni_macaddr),
+				allocbs ? "" : "re"));
 			break;
 		case IEEE80211_AUTH_SHARED_RESPONSE:
 			if (ni == ic->ic_bss) {
@@ -862,20 +867,20 @@
 				ic->ic_stats.is_rx_auth_fail++;
 				return;
 			}
+			IEEE80211_DPRINTF(ic,
+				IEEE80211_MSG_DEBUG | IEEE80211_MSG_AUTH,
+				("station %s authenticated (shared key)\n",
+				ether_sprintf(ni->ni_macaddr)));
 			break;
 		default:
 			IEEE80211_DPRINTF(ic, IEEE80211_MSG_AUTH,
-				("%s: bad seq %d from %s\n", __func__,
-				seq, ether_sprintf(wh->i_addr2)));
+				("%s: bad shared key auth seq %d from %s\n",
+				__func__, seq, ether_sprintf(wh->i_addr2)));
 			ic->ic_stats.is_rx_bad_auth++;
 			return;
 		}
 		IEEE80211_SEND_MGMT(ic, ni,
 			IEEE80211_FC0_SUBTYPE_AUTH, seq + 1);
-		IEEE80211_DPRINTF(ic, IEEE80211_MSG_DEBUG | IEEE80211_MSG_AUTH,
-			("station %s %s authenticated\n",
-			ether_sprintf(ni->ni_macaddr),
-			(allocbs ? "newly" : "already")));
 		break;
 
 	case IEEE80211_M_STA:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401280014.i0S0ExII054109>