Commit Graph

361 Commits

Author SHA1 Message Date
Andreas Schultz 890a2af6bb split STA deletion into immediate and delayed action
When sending a DeAuthentication frame to a STA we have to wait
a bit to make sure the driver has actually delivered the frame.
Once we get the DeAuthetication frame from a STA, we can stop
waiting and delete the STA.
2016-11-11 13:32:44 +01:00
Andreas Schultz 2f2a287928
remove some left over SmaretCAPWAP messages and AC pieces 2016-11-08 15:01:08 +01:00
Tobias Hintze 9d0fe1cc76 [wtp] fix argument parsing
* efd9eedd introduced a bug which made -c unusable
2016-09-22 16:18:28 +02:00
Andreas Schultz 247a65c7d5 correctly handle endianess when parseing RSNE
The length fields in the RSN elements are little endian. We
need to convert then to host order when reading.
2016-09-22 10:36:01 +02:00
Tobias Hintze efd9eedd51 version information, usage 2016-09-09 21:28:26 +02:00
Andreas Schultz 4068f7d308 forward action frames from STAs to AC 2016-08-28 18:18:53 +02:00
Andreas Schultz f4a2bae666 move kmod to top level directory 2016-08-23 09:08:46 +02:00
Andreas Schultz 0101ea6e56 fork SmartCAWPAP as FreeWTP 2016-08-23 08:55:15 +02:00
Andreas Schultz 8cc6559f08 report supported Split MAC profiles and validate it in AC requests 2016-08-17 16:01:53 +02:00
Andreas Schultz de0ffd5153 properly handle a DTLS handshake failure
early DTLS handshake failures would not terminate the read
loop and cause the remaining handshake bytes to be feed to
packet reader, causing an error assertion.

Rework the main read loop to terminate it when the read
event is not longer active and stop the read event on
handshake failure.

Also, make the DTLS handshake erorr message a bit more readable
by appending the WolfSSL error message to it.

Fixes issue #8.
2016-08-17 15:18:35 +02:00
Andreas Schultz 627ecd5a9e rework MAC type handling so that split, local and both MAC's are possible 2016-08-17 14:10:04 +02:00
Andreas Schultz 0df59ddaad fix missing element declaration from ff290d80b5 2016-08-17 14:10:04 +02:00
Andreas Schultz ff290d80b5 add RFC 7494 CAPWAP elements 2016-08-17 11:55:56 +02:00
Andreas Schultz a488af66cf add vendor VSA to set additional key and IGTK support
IGTK == Management Frame Protection
2016-08-15 15:30:29 +02:00
Andreas Schultz ac135e16c4 add VSA to report supported ciphers per radio 2016-08-12 12:08:06 +02:00
Andreas Schultz ecf7a24eac [wtp-kmod] replace some printk based tracing with ftrace events 2016-08-11 15:43:19 +02:00
Andreas Schultz 01919fffd9 update support for group key updates with Update WLAN 2016-08-08 09:25:01 +02:00
Andreas Schultz 02e8d534b5 preserve QoS tid for injected QoS data frames
The TX path will overwrite the TID based on the SKB
priority. Load the QoS TID from 802.11 frames into
the skb priority to preserve it during TX handling.
2016-08-02 15:46:07 +02:00
Andreas Schultz 3626927722 reset timeout_action on assoc response frame
Assoziation is complete when we get a response frame. We need to
reset the timeout action here, otherwise the client gets detached
as soon as the timer fires.
2016-08-01 18:14:00 +02:00
Andreas Schultz 2ac3944e7a implement WPA2 Stations Key handling
Implement the required support for extrace the cipher
suite settings from the the RS Information Element and
set the station key based on the 802.11 Station Key
CAPWAP message element.

Group Key update handling is currently not implemented nor is
Station Key update handling.
2016-07-27 12:36:34 +02:00
Andreas Schultz a131e17a6e fix 802.11 Station Key IE handling
memsetting the data to zero right after assigning them
is obviously wrong
2016-07-27 12:17:00 +02:00
Andreas Schultz 0e19b53e28 forward PAE (IEEE 802.1X Authentication) frames as raw 802.11 frames to AC 2016-05-10 17:07:46 +02:00
Andreas Schultz b0aaaa4436 replace memcmp on message id struct with direct compare
cset 3761122c fixed one place, but a few others remained.
This should take care of them all and fix a missing
IE in Add WLAN responses.
2016-05-06 17:52:39 +02:00
Andreas Schultz 6024cc15cf fix interpretation of Add WLAN's capability field
RFC 5416 copies the order of the capability flags from the
IEEE 802.11 capability IE. However, the bit ordering assumtions
in RFC 5416 differ from IEEE 802.11 (in the RFC the MSB is
numbered 0, in IEEE 802.11 the MSB is numbere 15).

RFC 5416 therefore specifies the capability flags bit reversed
compared to IEEE 802.11.
2016-05-03 10:28:38 +02:00
Andreas Schultz 651ccc0d33 rework debug output to be more helpful for radio config failures 2016-04-29 08:32:49 +02:00
Andreas Schultz baf1ccbc73 add Vendor TP WTP Timestamp to Echo Request 2016-04-08 15:18:53 +02:00
Tobias Hintze 4f3fe0c339 fix error-condition for invalid WLAN ID 2016-04-08 13:16:19 +02:00
Andreas Schultz 813f24b8ac implement station inactivity timeout
After the max station inactivity has expired, a probe request
(a data null frame) is sent to the station. It the station does
not ACK this frame, it is removed from the WTP.

Note: inactivity timeout is not the same as the CAPWAP Idle Timeout.
The CAPWAP Idle Timeout would remove a station due to inactivity
even when it is still reachable from the WTP. In contrast, the
inactivity timeout probes whether the station is still present
and only removes it when not.
2016-04-07 15:15:50 +02:00
Andreas Schultz bca5c91ae1 fix spelling of Deauthentication 2016-04-07 14:41:39 +02:00
Andreas Schultz 619c40d5be move nlmsg_free into nl send_and_recv
Simplify resource cleanup and return handling for all
callers of nl send_and_recv.
2016-04-07 11:54:07 +02:00
Andreas Schultz 7b4e386057 add nl80211_wlan_send_and_recv_msg helper 2016-04-07 11:31:11 +02:00
Andreas Schultz 5195ea9e37 rework nl80211_wlan_event in preparation of more events to handle 2016-04-07 11:31:11 +02:00
Andreas Schultz 8f03ecca9b add support functions to handle station inactivity
Detect support for AP side inactivity timer and reading
to the inactivity time for a station.
2016-04-07 11:31:11 +02:00
Andreas Schultz 4b1caad54b consolidate nl msg generation into helper and add more error handling to it 2016-04-07 11:31:04 +02:00
Andreas Schultz c19da7ffb8 move access to device ops into wrappers 2016-04-06 14:39:20 +02:00
Andreas Schultz 9096bff7a5 coding style updates in wifi_drivers 2016-04-06 14:13:33 +02:00
Andreas Schultz c132036914 use MACSTR and MAC2STR where appropriate
Replace capwap_printf_macaddress with MACSTR and MAC2STR
macro for all EUI48 MAC addresses. Save a text buffer in
the station structure and some buffers in functions.
2016-04-06 12:57:56 +02:00
Andreas Schultz f3fb11ac81 rework wifi device capability detection
get rid of deep indention, split into functions, no
functional changes.
2016-04-05 16:22:15 +02:00
Andreas Schultz f7e3ba846f rework station reuse in deauth logic to make it clearer
The hidden station clean logic in wifi_wlan_deauthentication_station
obfuscated the station object reuse in the only caller that actually
used it.
2016-04-05 13:19:58 +02:00
Andreas Schultz 146939a716 delete station from kmod before reusing it
The AC is supposed to react to WiFi Authorization requests
with Add Station messages. Such an Add Station will fail
with the station is already present in the data path.

A Authorization request for a station that the WTP already
in authorized state means that the station lost its assoziation
without the WTP detecting that. So, clearing it from the data
path seems to be appropriate.
2016-04-05 13:06:00 +02:00
Andreas Schultz bb684e92ea stop timeout when authorization completes 2016-04-05 13:05:43 +02:00
Andreas Schultz 934c7ea64d Don't reply to Probe Requests on an adjacent channel 2016-04-05 10:09:41 +02:00
Andreas Schultz ca74624d96 don't respond to probe requests with wildcard SSID's when running a hidden ssid
A hidden ssid should not be reveal to probe request wirh wildcard SSId'.
Only probe request for our hidden ssid should be answered.
2016-04-04 08:26:33 +02:00
Moritz Rosenthal 3761122c83 Bugfix for memcmp of struct failing on PPC hardware 2016-03-31 15:54:27 +02:00
Moritz Rosenthal 537e00d5b5 Logging to syslog is standard in Linux environment and should be used. 2016-03-30 16:37:35 +02:00
Andreas Schultz 29ed6544c5 switch everything to new log API and drop old one 2016-03-30 14:47:57 +02:00
Andreas Schultz dd6f6fcfe2 add format string atrribute to logging and fix all error found by it 2016-03-30 14:30:27 +02:00
Andreas Schultz cadbfa3d7e switch to more a syslog like logging style 2016-03-30 14:29:53 +02:00
Andreas Schultz 9572de350a switch timeout processing to libev
Rework the timeout and network code to use libev.
2016-03-30 14:06:43 +02:00
Andreas Schultz a4cb96da7c save and restore errno in logging function
this makes it save to use logging functions in statements that
expect errno to be unchanged
2016-03-30 13:10:51 +02:00