Age | Commit message (Collapse) | Author |
|
Part of the work to remove -Wno-uninitialized.
ok blambert jsg
|
|
|
|
in debug mode.
If the interface is in debug mode ieee80211_input() will print messages
about received frames to the console. On slow systems, printf() calls can
take so long that the next RX interrupt will be serviced immediately, if
the RX rate is sufficiently high. This effectively locks the system at IPL_NET.
If a concurrent scan is running, the scan will never finish because it
relies on a timeout at IPL_SOFTCLOCK to hop channels every 200msec.
This timeout never runs in the above situation, leaving the wireless
interface in 'scan' state forever.
To give the timeout a chance to run, perform the printf() call from a
work queue (idea from guenther@). This allows edd's slow soekris AP to
recover from 'ifconfig ral0 debug down up' in noisy RF environments.
With input from guenther, kettenis, blambert and deraadt.
ok deraadt
|
|
the caller and the function that the function will not fail to allocate
memory and return a NULL pointer. However, m_dup_pkthdr() violates
this contract, making it possible for functions that pass M_WAITOK to
be surprised in ways that hurt.
Fix this by passing the wait flag all the way down the functions that
actually do the allocation for m_dup_pkthdr() so that we won't be
surprised.
man page update forthcoming
ok claudio@
|
|
damien@ ok. ports checked by sthen@.
|
|
instead of a shallow copy to avoid problems if the mbuf is modified later
(e.g. if the frame is encrypted).
From FreeBSD.
http://marc.info/?l=freebsd-current&m=114168135819304&w=2
http://svn.freebsd.org/viewvc/base?view=revision&revision=156367
ok damien; committing with miod's permission (src is soft-locked)
|
|
|
|
instead of copying the 802.11 header on the stack and building
the ethernet header directly in the mbuf, build the ethernet
header on the stack directly from the 802.11 header in the
mbuf and copy the ethernet header to the mbuf after stripping
the 802.11 header.
makes the code easier to read/understand, especially, it is
now explicit what is being put in the ether_type field.
diff from Matthew Dempsky (matthew at dempsky dot org)
moved ieee80211_align_mbuf() under #ifdef __STRICT_ALIGNMENT
while i'm here.
|
|
as we do not use any field after i_addr4.
slightly modified version of a diff from Matthew Dempsky (matthew at
dempsky dot org), used MIN instead of min.
|
|
changed from 16 bytes to 2 bytes.
no binary change
|
|
with m_tag_copy_chain() failures.
Use m_defrag() to eliminate hand rolled defragging of mbufs and
some uses of M_DUP_PKTHDR().
Original diff from thib@, claudio@'s feedback integrated by me.
Tests kevlo@ claudio@, "reads ok" blambert@
ok thib@ claudio@, "m_defrag() bits ok" kettenis@
|
|
the SA Query Transaction Identifier field is now a 16-bit non-negative
counter value instead of a 128-bit random value.
|
|
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.
|
|
the code will allow the concurrent reception of fragments of three
fragmented MSDUs or MMPDUs as required by the 802.11 standard.
|
|
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.
|
|
- 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.
|
|
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.
|
|
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).
|
|
ieee80211_mgmt_output() and ieee80211_encap().
use new IEEE80211_C_APPMGT capability flag where appropriate.
rename ic_tim_mcast to ic_tim_mcast_pending.
|
|
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.
|
|
|
|
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.
|
|
to a separate ieee80211_deliver_data() function.
this will later be called by the A-MSDU deaggregation routine.
|
|
when acting as an access point instead of having each driver doing the
job.
tested by krw@ (ral AP) and me with several drivers.
|
|
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.
|
|
|
|
from MMIE etc...
this code can't be triggered as no drivers claim MFP capability yet.
|
|
|
|
more IEs.
|
|
|
|
|
|
add support for MFP negotiation during association.
|
|
Free the mbuf in the ieee80211_eapol_key_input() function.
Do not assume the frame is contiguous, call m_pullup2() if it is not.
We need the frame to be contiguous to process KDEs efficiently in
EAPOL-Key frames (just like we process IEs in management frames).
However, there are drivers like upgt(4) that use m_devget() in the
RX path. m_devget() can return fragmented mbuf chains.
Notice that we should do the same m_pullup2() for management frames.
This will be done later.
Remove the ic_recv_eapol callback.
|
|
wrong. hard-code 0xf for now. will be fixed post-release.
|
|
WPA is on and RX protection for TA is on.
Keep track of the TX/RX protection for each node when WPA is on.
tested by djm@ (ral+wpa), ckuethe@ (ath-noenc) and krw@ (wpi<->ral+wpa).
hints from bluhm@
has been in snaps for a few days.
pointed out by bluhm@ something like 1 year ago but we did not have
the right infrastructure to fix it properly at that time.
ok deraadt@
|
|
keep track of the number of associated STAs in PS mode.
|
|
fix IEEE80211_DEBUG builds.
|
|
make sure drivers pass a contiguous header, check header length earlier.
fix checking of frames sequence number for frames containing an Address 4
field (required for future work).
fix processing of control frames (only pspoll for now).
|
|
automatically prepend __func__ to output.
deobfuscates debug messages a bit.
no binary change unless compiled with IEEE80211_DEBUG.
|
|
this must not be included by drivers.
|
|
|
|
pass a pointer to an ieee80211_rxinfo structure containing those two
fields plus an extra flags field that indicates whether the frame was
decrypted by hardware or not.
required for a future fix.
|
|
ok deraadt@
|
|
do not parse RSN IE from beacons/probe responses if not scanning.
|
|
|
|
move ieee80211_setup_rates() to ieee80211_node.c
move some prototypes from ieee80211_proto.h to ieee80211_crypto.h
|
|
|
|
- add a ieee80211_recv_action() function (will be used later)
- some cleanup, remove unused prototypes, get rid of the
IEEE80211_VERIFY_* macros
|
|
4-way handshake, regardless of what protocol the supplicant is using.
Ignore the IEs we don't care about instead of deauthenticating with a
reason code of 'RSN_DIFFERENT_IE'.
|
|
handshake protocols (both supplicant and authenticator state
machines) as defined in the IEEE 802.11i standard.
Software implementation of the TKIP (Temporal Key Integrity
Protocol) and CCMP (CTR with CBC-MAC Protocol) protocols.
This diff doesn't implement any of the 802.1X authentication
protocols and thus only PSK authentication (using pre-shared
keys) is currently supported.
In concrete terms, this adds support for WPA-PSK and WPA2-PSK
protocols, both in station and hostap modes.
The following drivers are marked as WPA-capable and should
work: bwi(4), malo(4), ral(4), iwn(4), wpi(4), ural(4),
rum(4), upgt(4), and zyd(4)
The following options have been added to ifconfig(8):
wpa, wpapsk, wpaprotos, wpaakms, wpaciphers, wpagroupcipher
wpa-psk(8) can be used to generate keys from passphrases.
tested by many@
ok deraadt@
|