PERFORCE change 66193 for review

Sam Leffler sam at FreeBSD.org
Wed Dec 1 10:06:02 PST 2004


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

Change 66193 by sam at sam_ebb on 2004/12/01 18:05:56

	correctly handling of multiple information elements

Affected files ...

.. //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#20 edit

Differences ...

==== //depot/projects/wifi/sbin/ifconfig/ifieee80211.c#20 (text+ko) ====

@@ -694,7 +694,7 @@
 static void
 printies(const u_int8_t *vp, int ielen, int maxcols)
 {
-	for (; ielen > 0; ielen -= 2+vp[1])
+	while (ielen > 0) {
 		switch (vp[0]) {
 		case IEEE80211_ELEMID_VENDOR:
 			if (iswpaoui(vp))
@@ -711,6 +711,9 @@
 			printie(" ???", vp, 2+vp[1], maxcols);
 			break;
 		}
+		ielen -= 2+vp[1];
+		vp += 2+vp[1];
+	}
 }
 
 static void


More information about the p4-projects mailing list