netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH Linux-2.6.8-rc1] prism54 Fix wrong type for BSSID
@ 2004-07-12 19:08 Margit Schubert-While
  2004-07-14 18:43 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Margit Schubert-While @ 2004-07-12 19:08 UTC (permalink / raw)
  To: jgarzik; +Cc: netdev, prism54-devel

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

2004-07-12 Margit Schubert-While <margitsw@t-online.de>

* The OID type for BSSID was incorrectly set to type SSID.
  It should be type RAW. This lead to interesting reporting
  by "iwpriv ethX g_bssid". 
  (Which caused garbage output and possibly an out of bound)

* Be ultra-cautious in reporting SSID by changing the "%s"
  to "%.*s" and passing the length. (Prompted by the false
  type above, whereby length = 0 and a %s on a garbage field)

Jeff, this is on top of the previous patch (chanfreq.patch)
from 2004/07/06 (which isn't in 2.6.8-rc1).

Margit







[-- Attachment #2: bssid.patch --]
[-- Type: text/x-diff, Size: 955 bytes --]

diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/oid_mgt.c linux-2.6.8-02/drivers/net/wireless/prism54/oid_mgt.c
--- linux-2.6.8-01/drivers/net/wireless/prism54/oid_mgt.c	2004-07-06 17:26:44.000000000 +0200
+++ linux-2.6.8-02/drivers/net/wireless/prism54/oid_mgt.c	2004-07-12 21:05:22.000000000 +0200
@@ -62,7 +62,7 @@
 
 	/* 802.11 */
 	OID_U32_C(DOT11_OID_BSSTYPE, 0x10000000),
-	OID_STRUCT_C(DOT11_OID_BSSID, 0x10000001, u8[6], OID_TYPE_SSID),
+	OID_STRUCT_C(DOT11_OID_BSSID, 0x10000001, u8[6], OID_TYPE_RAW),
 	OID_STRUCT_C(DOT11_OID_SSID, 0x10000002, struct obj_ssid,
 		     OID_TYPE_SSID),
 	OID_U32(DOT11_OID_STATE, 0x10000003),
@@ -770,8 +770,9 @@
 	case OID_TYPE_SSID:{
 			struct obj_ssid *ssid = r->ptr;
 			return snprintf(str, PRIV_STR_SIZE,
-					"length=%u\noctets=%s\n",
-					ssid->length, ssid->octets);
+					"length=%u\noctets=%.*s\n",
+					ssid->length, ssid->length,
+					ssid->octets);
 		}
 		break;
 	case OID_TYPE_KEY:{

[-- Attachment #3: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Prism54-devel mailing list
Prism54-devel@prism54.org
http://prism54.org/mailman/listinfo/prism54-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH Linux-2.6.8-rc1] prism54 Fix wrong type for BSSID
  2004-07-12 19:08 [PATCH Linux-2.6.8-rc1] prism54 Fix wrong type for BSSID Margit Schubert-While
@ 2004-07-14 18:43 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2004-07-14 18:43 UTC (permalink / raw)
  To: Margit Schubert-While; +Cc: netdev, prism54-devel

applied

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-14 18:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-12 19:08 [PATCH Linux-2.6.8-rc1] prism54 Fix wrong type for BSSID Margit Schubert-While
2004-07-14 18:43 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).