summaryrefslogtreecommitdiffstats
path: root/sys/net80211 (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* make TKIP TSC start at 1 (instead of 0) to match the standard.damien2009-04-161-4/+7
| | | | | many implementations (including ours) will drop frames with a TSC equal to 0 (they are considered replayed frames.)
* do not cache the computed TTAK unless MIC has been verified.damien2009-04-141-10/+12
| | | | | | this prevents an attacker from changing the TTAK (DoS attack) by sending a frame with a large TSC but with a bad ICV and/or MIC. now an attacker can only invalidate the cached TTAK.
* move #define IEEE80211_NO_HT under #ifdef SMALL_KERNEL insteaddamien2009-03-262-5/+3
| | | | | | of defining it unconditionnaly. although the HT code is not ready yet, making it compile on GENERIC kernels will help catch regressions/bugs if any.
* sync with 802.11w draft 8.0.damien2009-03-264-13/+15
| | | | | the SA Query Transaction Identifier field is now a 16-bit non-negative counter value instead of a 128-bit random value.
* Fix setting of the Short Slot Time subfield of the Capability Informationdamien2009-03-062-5/+4
| | | | | | | | | | | field in (Re)Association Requests. This fixes association with APs refusing non-short-slot-time capable STAs. This should also prevent the AP we're associating with to disable the use of short slot time in the BSS as we join. Fix debug message in recv_assoc_resp() while I'm here (s/reason/status/). Scary. Thanks to Adam Emanuel for spotting this.
* make "ifconfig if0 chan" list the channels supported by the device.damien2009-02-152-2/+35
| | | | | | | | | | | | | add "ifconfig if0 scan" to scan for access points or to list known stations in Host AP mode. remove the [-]wmm command while i'm here. QoS is mandatory with 802.11n so there's not much point into making it an option. fix parsing of the "powersave" command too. discussed with deraadt@ man page hints from jmc@ display hints from sobrado@ "i like it" cnst@, grange@
* Change ifconfig wpaakms default setting to `psk' instead of `psk,802.1x'.damien2009-02-133-20/+23
| | | | | | | | | | | | | | Some supplicants will autoselect 802.1X without giving users the possibility to choose between PSK or 802.1X. Similarly, no longer announce `PSK with SHA-256 based KDF' AKMP (defined in Draft 802.11w) by default in the RSN IE of beacons and probe responses as it confuses some broken supplicants. This kind of sacrifies security for interoperability with shitty (but unfortunately widespread) clients that do not follow the 802.11 standard properly. This fixes associations from Intel PROSet on XP and also reportedly fixes some Mac OS clients. I will likely make `psk-sha256' configurable through ifconfig wpaakms after the 4.5 release.
* initial 802.11 defragmentation bits.damien2009-02-082-2/+109
| | | | | the code will allow the concurrent reception of fragments of three fragmented MSDUs or MMPDUs as required by the 802.11 standard.
* fix a panic that occurs when IEEE80211_STA_ONLY is defined (SMALL_KERNEL).damien2009-01-291-3/+4
| | | | | noticed by ray@, more investigation from sthen@ fix tested by sthen@
* Block Ack agreements are unidirectional.damien2009-01-288-149/+215
| | | | | | | | | | Maintain state for both originator and recipient roles separately. Do not allocate receive reordering buffer in addba_request(). Test the "initiator" bit in incoming DELBA frames and set it appropriately in outgoing DELBA frames. Separate callbacks for Tx/Rx too. no binary change since all this is #ifdef'ed out.
* In ieee80211_find_node(), roll our own RB_FIND() based on the key (macaddr)damien2009-01-282-10/+22
| | | | | instead of resorting to horrid hacks/casts. Restore the ieee80211_node structure back to its original state.
* unbreak SMALL_KERNEL builds by adding missing #ifndef IEEE80211_STA_ONLYdamien2009-01-271-2/+10
| | | | pointed out by krw@
* move ni_macaddr field at the top of the ieee80211_node structure.damien2009-01-262-11/+10
| | | | | | | this way we can avoid putting a full node structure (which is huge) on the stack in ieee80211_find_node(). this is a bit tricky but the RB_FIND macro wants an "elem" structure, not a field of "elem".
* remove ni_ba field from ieee80211_node structure as it is not used yet.damien2009-01-262-3/+6
| | | | | | | this reduces memory footprint and avoids a stack usage warning in ieee80211_find_node() that breaks amd64 build. pointed out by landry@
* Add some initial HT bits (not enabled yet) based on 802.11n Draft 7.01:damien2009-01-2616-282/+1668
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - implement A-MPDU frames buffering and reordering - implement A-MSDU decapsulation - process/send ADDBA Request, ADDBA Response and DELBA action frames - process Block Ack Request control frames (including MTBAR) - implement PBAC support (Protected Block Ack) - add some incomplete HT Capabilities and HT Operation IEs parsing Add more Management Frame Protection bits based on 802.11w Draft 7.0: - implement SA Query procedure (both AP and STA) - cleanup BIP Fix some bugs: - fix check for WEP key length that otherwise caused a stack smash in ieee80211_wep_encrypt (pointed out by Xavier Santolaria on macppc) - properly stop EAPOL timeout: fixes a panic that occured in HostAP mode when turning the interface down while a 4-way handshake is in progress (pointed out by Doughertys) Did some code cleanup too. The HT bits are currently not compiled in (IEEE80211_NO_HT is defined) because they won't be ready until after the next release and I didn't want to grow the kernel or to inadvertently introduce new bugs. They are here such that other people can look at the code. Notice that I had to add an extra parameter to ic_send_mgmt() for action frames, that is why there are small changes in drivers defining their own ic_send_mgmt() handler. Sorry for the not very incremental diff but this has been sitting in my tree for too long now.
* txpower range checks should be inclusive.jsg2008-12-141-3/+3
| | | | | | From FreeBSD via mickey in pr 6024. ok damien@
* Add an ieee80211_notify_dtim() function that drivers should call afterdamien2008-12-142-2/+34
| | | | | every DTIM in HostAP mode. Flushes all group addressed MSDUs buffered at the AP for power management.
* typo, no binary change.damien2008-12-061-2/+2
|
* typos in comments - no binary change.damien2008-12-032-6/+6
|
* small fix for IEEE80211_STA_ONLY: do not let users set HostAP specificdamien2008-12-031-3/+4
| | | | flags using "nwflag".
* cleanup ieee80211_classify(): retrieve VLAN tag from m_pkthdr.ether_vtag.damien2008-12-021-8/+3
|
* use different TSCs when sending the two MIC failure report framesdjm2008-11-132-4/+8
| | | | | to our AP as we enter TKIP countermeasures by caching the TSC of the last frame to fail the MIC; prompted by and ok damien@
* Mitigate the new WPA attack described in Beck, M. and Tews S. "Practicaldjm2008-11-131-7/+20
| | | | | | | | | | | | | | attacks against WEP and WPA". The attack works by using the MIC failure notification messages sent station->AP on MIC failure as an oracle to verify guesses to reverse the CRC. To stop this, we can skip sending these notify frames except when we are going into "countermeasures" mode (drop the AP association, do not process traffic for 60s). When we go into countermeasures, I send two MIC failure notifications in a row - this should force the AP into countermeasures too. ok damien@
* Prevent a crash in ieee80211_setkeys() when unplugging an interface inmk2008-10-231-1/+3
| | | | | | hostap mode by canceling the group rekey timeout in ieee80211_node_detach(). ok damien
* Second pass of simple timeout_add -> timeout_add_sec conversionsblambert2008-10-152-4/+4
| | | | | | | This should take care of the simpler ones (i.e., timeout values of integer multiples of hz). ok krw@, art@
* First step towards cleaning up the Ethernet driver ioctl handling.brad2008-10-021-7/+3
| | | | | | | | | | | | | | | | | | | | Move calling ether_ioctl() from the top of the ioctl function, which at the moment does absolutely nothing, to the default switch case. Thus allowing drivers to define their own ioctl handlers and then falling back on ether_ioctl(). The only functional change this results in at the moment is having all Ethernet drivers returning the proper errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown ioctl's. Shrinks the i386 kernels by.. RAMDISK - 1024 bytes RAMDISKB - 1120 bytes RAMDISKC - 832 bytes Tested by martin@/jsing@/todd@/brad@ Build tested on almost all archs by todd@/brad@ ok jsing@
* unbreak the tree.damien2008-09-281-1/+2
| | | | | | pointed out by deraadt@, Markus Peloquin sorry guys.
* Initial implementation of PMKSA caching and pre-authentication.damien2008-09-2713-167/+459
| | | | | | | | | | | | | | | | | | This will be required for future WPA-Enterprise support (802.1X). Add ieee80211_needs_auth() function (not implemented yet) to notify the userland 802.1X PACP machine when an 802.1X port becomes enabled (that is after successfull 802.11 Open System authentication). Add SIOCS80211KEYRUN and SIOCS80211KEYAVAIL ioctls so that the PACP state machine can kick the 802.11 key state machine and install PMKs obtained from 802.1X (pre-)authentication. Enable SHA-256 based AKMPs by default while I'm here (TGw). This uses SHA-256 for key-derivation (instead of SHA1), AES-128-CMAC for data integrity, and AES Key Wrap for data protection of EAPOL-Key frames. An OpenBSD AP will always advertise this capability and an OpenBSD STA will always prefer SHA-256 based AKMPs over SHA1 based ones if both are supported by an AP.
* Add some inline functions to test the presence of optional 802.11damien2008-09-276-111/+98
| | | | | | | | | | | | | | | | header fields (Sequence Control, Address 4, QoS Control, +HTC) and use them where appropriate. Add ieee80211_get_qos() inline function to extract the QoS control field of an 802.11 header instead of duplicating the same scary code everywhere (the location of this field depends on the presence of an Address 4 field). Export ieee80211_up_to_ac() so that drivers can select the access category to use based on the TID subfield of the QoS Control field. Define more QoS-related bits for the RSN Capabilities field of RSN IE (will be used later).
* define IEEE80211_STA_ONLY if SMALL_KERNEL is defined to shrinkjsg2008-09-081-1/+5
| | | | | | the size of install media. ok damien@ deraadt@
* third parameter of ieee80211_get_assoc_req() is a management framedamien2008-09-031-4/+4
| | | | | | | subtype, not a boolean indicating assoc or reassoc. rename the parameter and use if (type == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) instead of if (reassoc). it worked only because IEEE80211_FC0_SUBTYPE_ASSOC_REQ is equal to 0.
* use C99 style struct initializer instead of GCC specific one (from NetBSD).damien2008-09-011-10/+10
| | | | some whitespace cleanup too.
* add ic_tid_noack bitmap to indicate a per-TID ACK policy (1=no ack,damien2008-09-013-9/+19
| | | | | | 0=normal ack). all bits are currently set to 0. use this bitmap to set the ACK policy of the QoS control field of outgoing QoS frames.
* extend ieee80211_classify() to extract DSCP field from IPv6 packets too.damien2008-09-011-25/+46
|
* rework previously unused ieee80211_pwrsave() function, call it fromdamien2008-09-014-29/+66
| | | | | | ieee80211_mgmt_output() and ieee80211_encap(). use new IEEE80211_C_APPMGT capability flag where appropriate. rename ic_tim_mcast to ic_tim_mcast_pending.
* move code to support Frequency-Hopping spread spectrum (FHSS) PHYsdamien2008-08-298-129/+16
| | | | | | | to the Attic. nothing uses it in the tree and it is very unlikely that something will use it one day. the only driver supporting FHSS PHYs in the tree is ray(4) and it does not use net80211.
* garbage collect unused capabilities and configurations flags.damien2008-08-291-4/+3
| | | | | | | | | | add two capabilities flags: IEEE80211_C_HT for HT STAs (802.11n) and IEEE80211_C_APPMGT which indicates the capability for an AP to buffer unicast and multicast traffic for STAs in PS mode. all drivers claiming HostAP support should support that but the truth is that none of them do. most of them are still at the 802.11b-only era and do not update dynamic parts of beacons or process frames from ic_pwrsaveq.
* unbreak IEEE80211_DEBUGdamien2008-08-281-2/+2
|
* move definitions of channels attributes away from ieee80211.h suchdamien2008-08-273-34/+47
| | | | | | | | | | that ieee80211.h contains only definitions that are part of the 802.11 standard and not constants used internally by net80211. because channels attributes are exported to userland through the radiotap BPF interface, add the definitions to ieee80211_radiotap.h too (which must be kept in sync with what is used in net80211). also, do not export combinations of channel attributes to userland so that noone get stupid ideas.
* add IEEE80211_RADIOTAP_F_FCS radiotap flag from NetBSD.damien2008-08-271-1/+2
| | | | | | | | | use it in drivers that leave the 802.11 FCS in frames passed to radiotap BPF. otherwise, userland has no way to know if FCS is included or not as it depends on drivers. this is required by some ports (aircrack). requested by dhill@
* introduce new IEEE80211_STA_ONLY kernel option that can be set todamien2008-08-2712-62/+284
| | | | | | | | | remove IBSS and HostAP support from net80211 and 802.11 drivers. it can be used to shrink RAMDISK kernels for instance (like what was done for wi(4)). it also has the benefit of highlighting what is specific to IBSS and HostAP modes in the code. the cost is that we now have two code paths to maintain.
* use LLC_SNAPFRAMELEN here too.damien2008-08-152-7/+7
|
* ieee80211_derive_pmkid() is not used eitherdamien2008-08-141-2/+4
|
* #ifdef notyet ieee80211_kdf() as it is not used yet (shrink kernel a bit)damien2008-08-141-1/+5
|
* move the HostAP bridge code and the delivery of data frames to ether_inputdamien2008-08-141-76/+85
| | | | | to a separate ieee80211_deliver_data() function. this will later be called by the A-MSDU deaggregation routine.
* in ieee80211_input(), call if_start() after enqueuing frames in if_snddamien2008-08-141-1/+2
| | | | | | | when acting as an access point instead of having each driver doing the job. tested by krw@ (ral AP) and me with several drivers.
* put ieee80211_dump_pkt() under #ifdef IEEE80211_DEBUGdamien2008-08-142-2/+6
|
* one should never use sizeof(struct llc) since 802.2 LLC headersdamien2008-08-131-14/+14
| | | | | | | | | have a variable length. use LLC_SNAPFRAMELEN instead (which happen to be equal to sizeof(struct llc)) as we only deal with LLC+SNAP headers. some indentation tweaks while i'm here. no binary change.
* do not increment is_rx_eapol_key twice for each frame.damien2008-08-131-23/+17
| | | | | fix a test on the mbuf length and one on the descriptor version. remove redundant checking of GTK KDE length.
* adopt the integrity group cipher of the AP at association time.damien2008-08-121-1/+5
|