Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Dec 2004 18:06:00 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 66193 for review
Message-ID:  <200412011806.iB1I60TQ004245@repoman.freebsd.org>

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

Change 66193 by sam@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



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