Ticket #517 (closed enhancement: fixed)

Opened 6 years ago

Last modified 4 years ago

New IOCTL interface to allow application to pass IE to be sent in Management frames

Reported by: pramod@atheros.com Assigned to: mrenzmann
Priority: minor Milestone: version 0.9.3
Component: madwifi: other Version: trunk
Keywords: Cc:
Patch is attached: 1 Pending:

Description

New IOCTL interface to allow application to pass IE to be sent in Management frames

Attachments

iemanagement.diff (21.2 kB) - added by pramod@atheros.com on 04/09/06 03:01:07.
madwifi-appie.2.diff (22.2 kB) - added by ccpearson on 09/06/06 20:56:07.
Updated patch, replaces previous attachments (iemanagement.diff and ieee80211_ioctl.h)
madwifi-0.9.2-appie.diff (21.5 kB) - added by ccpearson on 10/17/06 20:46:19.
Alternate version of patch for MadWifi 0.9.2 distro

Change History

04/09/06 03:01:07 changed by pramod@atheros.com

  • attachment iemanagement.diff added.

04/10/06 07:35:09 changed by mrenzmann

  • status changed from new to assigned.
  • owner set to mrenzmann.
  • version set to trunk.
  • milestone set to version 0.9.0 - move to new codebase.

Thanks for the patch. Although your e-mail address says you're from Atheros I'd ask you to sign your patch off so that it can be committed.

04/10/06 19:46:33 changed by pramod@atheros.com

Signed-off-by: pramod Developer pramod@atheros.com

Atheros Communications inc..

04/10/06 19:54:50 changed by mrenzmann

Sorry for knitpicking, but please sign your patch off using your real name. Please ask Kevin Yu to contact me directly at mrenzmann@otaku42.de in case you're not willing (or not allowed) to reveal your real name. Thanks.

04/10/06 19:58:12 changed by pramod@atheros.com

Signed-off-by: pramod Babu Gummaraj pramod@atheros.com

Atheros Communications inc..

04/23/06 02:01:55 changed by kelmo

  • milestone changed from version 0.9.0 - move to new codebase to version 0.9.x - progressive release candidate phase.

05/16/06 05:45:31 changed by dyqith

any reason not to apply this patch ? looks like it'll be useful

06/13/06 11:08:56 changed by Mister_X

It seems there's no reason not to appply it ;)

06/13/06 12:45:13 changed by mrenzmann

  • priority changed from major to minor.

Patch needs to be rediffed, since it does not apply cleanly against current revisions. In addition the implemented code needs to be reformatted before the changes can be committed. Defering that task for now, so the patch won't go into 0.9.1.

06/19/06 10:26:08 changed by mrenzmann

It would be great to get some kind of explanation regarding the meaning of the ieee80211_ioctl.h attachment...

07/10/06 22:12:16 changed by anonymous

I downloaded ieee80211_ioctl.h. It does not contained any changes. It's the same as the one in the current release.

08/10/06 01:27:28 changed by Christopher.C.Pearson@intel.com

Hi,

I'm trying to understand the status of ticket #517. This fix will help achieve certification for the Intel WiFi Simple Config reference implementation.

The last comment on the ticket says the patch would not apply correctly, and needs to be reformatted. Has this patch been included in a release? If not, do you know when it might be?

Regards, Chris Pearson

08/10/06 03:06:23 changed by kelmo

Hi Chris,

Thanks for your interest. My understanding is that this patch can be applied when someone volenteers their time to:

  1. rewrite it according to the coding style required
  2. test it, making sure it works as intended and introduces no regression (to best of ability)
  3. apply it and close this ticket

Only the third step requires developer access to the archive, anyone with the ability to perform the first two steps is welcome to do so, and their help would be most appreciated.

Mike, aka. mrenzmann, currently has limited time to perform these things himself.

Thanks, Kel.

08/10/06 04:39:13 changed by mentor

For my information, how will it help achieve Intel Simple COnifugration WiFi compliance?

08/10/06 07:54:25 changed by Christopher.C.Pearson@intel.com

how will it help achieve Intel Simple Configuration WiFi compliance?

Madwifi driver is used with non-Intel NICs to run WFA test cases. IE support needs to be there to pass the tests.

08/11/06 04:36:40 changed by kelmo

If it is in your companies interests to have this patch integrated, then maybe they would allow someone with time and talent to cleaup up the code so that it may be applied?

Thanks, Kel.

08/11/06 04:37:23 changed by kelmo

s/cleaup/clean/

08/11/06 06:08:27 changed by ccpearson

Hmmm, I assumed that the original developer was pushing this through to release. He seems to have dropped out of the thread awhile ago -- I'll check with him to see what his plans are.

09/05/06 04:47:49 changed by ccpearson

Didn't hear back from Pramod, so I assume he won't mind if I jump in here. I reformatted his patch per the coding stds, fixed a couple bugs, and rediffed the patch against a current trunk snapshot. I'm submitting it again, with the following doubts:

- Only had time to test beacon and probe response mgmt frames. Didn't regression test code for other mgmt frames (only reformatted).

- Original patch wasn't freeing the app's IE buffers pointed to by the vap. Added code to free the buffers in ath_vap_delete() -- not certain that's the right/best place to do that.

- Original patch didn't validate the app's input IE buffer, allowing app to send anything, including 802.11 exploits. Added code to validate the format of the input buffer. Going out on a limb, also added logic to prevent the app from setting "system IEs", meaning any IEE80211_ELEMID_* (except IEEE80211_ELEMID_VENDOR) that appears in the sources. I'm counting on the reviewer to yank that if it seems risk/undesirable.

Signed-off-by: Chris Pearson <Christopher.C.Pearson@intel.com>

09/05/06 05:51:37 changed by mrenzmann

Thanks for the new submission, Chris. On a first quick glance the patch looks good. It should be reviewed again and then be submitted to the repos. Anyone up for this? I won't be able to do that during the next weeks...

09/06/06 20:56:07 changed by ccpearson

  • attachment madwifi-appie.2.diff added.

Updated patch, replaces previous attachments (iemanagement.diff and ieee80211_ioctl.h)

09/06/06 21:02:05 changed by ccpearson

I just re-submitted the patch -- needed to remove a debugging statement (line 590 in old patch).

09/19/06 19:01:40 changed by ahmeduddin.f.mohmad@intel.com

In the "madwifi-appie.2.diff". I am not able to patch the line 395,403 "last_ev = current_ev" anywhere in my "madwifi-0.9.2/ieee80211_wireless.c" file. Could anyone tell me as to where i can help myself.

Regards, Ahmed

09/20/06 18:21:09 changed by ccpearson

Ahmed, the patch applies to the trunk at time of submission (9/05). It does not apply to the distribution your are using (0.9.2). I will contact you off-line to resolve this.

-- Chris

10/13/06 03:50:26 changed by hector

What is the purpose of the ieee80211_ioctl.h and ieee80211_beacon.c attachments(by anonymous)? They don't seem to have any relationship with this ticket. Can't those be deleted from here to avoid confusion?

10/13/06 04:03:41 changed by kelmo

They have been removed as per request.

10/17/06 01:35:40 changed by peng.ge@intel.com

I have the same question as ahmeduddin.f.mohmad@intel.com, as I would like to have a copy of madwifi driver to work with Intel Simple Config reference implementation, which requires the patch from this ticket.

Can Chris contact me with how I should proceed too? Or maybe post the generic solution out here in case anyone needs to know in the near future? On the other hand, I am wondering if I should try to get the trunk as of 09/2005? and how? :)

Thanks. Peng

10/17/06 01:51:19 changed by ccpearson

Peng, I mailed you a patch that applies correctly to MadWifi 0.9.2. I haven't submitted it to this ticket yet because I haven't had time to test it.

-- Chris

10/17/06 20:46:19 changed by ccpearson

  • attachment madwifi-0.9.2-appie.diff added.

Alternate version of patch for MadWifi 0.9.2 distro

10/17/06 20:55:38 changed by ccpearson

Peng Ge tested the 0.9.2 version of the patch successfully, so I have submitted it. Thanks Peng!

This is not intended for integration into MadWifi source tree -- madwifi-appie.2.diff is the version that should be integrated to the repos. Also, my first submission of this patch (madwifi-appie.diff) is obsolete and should be removed.

-- Chris

10/18/06 05:09:47 changed by mrenzmann

  • milestone changed from version 0.9.x - progressive release candidate phase to version 0.9.3.

madwifi-appie.diff removed as requested. madwifi-appie2.diff looks ready for inclusion as far as I can tell from a quick check, and IMO should go into 0.9.3.

10/18/06 05:28:37 changed by kelmo

I have this patch and the one from #925 in a working copy for the moment. Will commit them after a small amount of use, unless someone beats me to it.

@ ccpearson, if you could offer a small blurb on how to take advantage of this new feature, so that we may add it to our wiki/docs, that would be great too.

Thanks.

10/18/06 13:47:20 changed by kelmo

  • status changed from assigned to closed.
  • resolution set to fixed.

Committed in r1756. Thanks for following through Chris. Although, I would still like to know, in your own words how to best make use of this feature, so that it may be documented, tia.

10/18/06 18:07:13 changed by peng.ge@intel.com

This patch was mentioned in "Wi-Fi* Simple Config (WSC) Linux* Reference Implementation" from http-www3.intel.com/cd/ids/developer/asmo-na/eng/247741.htm

Simple Config (offical name: Wi-Fi Protected Setup) requires some special Information Elements to establish secured connection in its (app-level) protocol, therefore, this #517 patch is essential to allow WPS function properly.

I suppose in the future, some other protocols may also take advantage of this feature in the similar fashion.

Enjoy.

10/19/06 20:46:50 changed by ccpearso

Following is a technical description of the patch, incorporating Peng's excellent overview. Wordsmith as you see fit.


This patch defines three new IOCTLs:

- IEEE80211_IOCTL_SET_APPIEBUF appends a set of custom information elements to certain outbound management frame types (beacon, probe request/response, and association request/response). The application may append a different IE set for each frame type. To stop appending custom IE's, the application may invoke the IOCTL with an empty IE set. Typically, an application would append vendor-specific IE's with ID 221. The application may not append "system IE's", meaning IE's generated or processed by the MadWifi driver itself. The IOCTL parameter is struct ieee80211req_getset_appiebuf.

- IEEE80211_IOCTL_GET_APPIEBUF enables queries the current set of custom information elements established (via IEEE80211_IOCTL_SET_APPIEBUF) for a specified management frame type. The IOCTL parameter is struct ieee80211req_getset_appiebuf.

- IEEE80211_IOCTL_FILTERFRAME sets a filter that determines which management frame types (beacon, probe request/response, assoc/reassoc request/response, auth/deauth, disassoc) MadWifi is to forward to the network interface (protocol ETH_P_80211_RAW). The IOCTL parameter is struct ieee80211req_set_filter. 'OR' the bits IEEE80211_FILTER_TYPE_*.

This patch is used by the "Wi-Fi* Simple Config (WSC) Linux* Reference Implementation" available from Intel at www3.intel.com/cd/ids/developer/asmo-na/eng/247741.htm. This patch is essential to allow the reference implementation to function properly.

Simple Config (official name: Wi-Fi Protected Setup) defines new vendor-specific information elements that enable unconfigured 802.11 stations to securely acquire network parameters, such as SSID and WPA key, with minimal user interaction.

Additionally, experimental or proprietary 802.11 management protocol extensions may exploit this feature.


Add/Change #517 (New IOCTL interface to allow application to pass IE to be sent in Management frames)