Commit Graph

378 Commits

Author SHA1 Message Date
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
9ded0bb87b release 1.2.1 2016-05-06 17:58:27 +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
d51873dd4b adjust OpenWRT package for v1.2.0 and OpenWRT HEAD 2016-04-29 09:04:52 +02:00
Andreas Schultz
480f5d8782 update README and NEWS for 1.2.0 release 2016-04-29 08:58:26 +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
Tobias Hintze
ca010916ae bump versionin configure.ac -> 1.2 2016-04-04 17:12:48 +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
Tobias Hintze
5d69226ace Merge pull request #6 from nm-mrt/invalid-compare-of-struct-variable
Bugfix for memcmp of struct failing on PPC hardware
2016-03-31 16:46:30 +02:00
Moritz Rosenthal
3761122c83 Bugfix for memcmp of struct failing on PPC hardware 2016-03-31 15:54:27 +02:00
Tobias Hintze
62af47a2f6 Merge pull request #5 from nm-mrt/log-to-syslog
Log to syslog
2016-03-30 16:50:37 +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
Andreas Schultz
84859e20c4 also clear the local control port when resetting the WTP state
Without reseting the port, the new control socket will be
bound to the same port as the old one.
2016-03-30 09:22:02 +02:00
Moritz Rosenthal
622f148150 Wrong option for ./configure in README.md 2016-03-29 16:54:02 +02:00
Andreas Schultz
32e9567f7b rework bssid handling and stop all used bssids when leaving RUN
Instead of haing a pool of unsused BSS Id's and a list of active
BSS's (wlans), use a single array and only mark the BSS Id as used
or unused.

When leaving RUN state, release (stop) all used BSS.
2016-03-29 15:28:40 +02:00
Andreas Schultz
40a98c9075 move packet processing from main receive loop into function 2016-03-29 11:51:39 +02:00
Andreas Schultz
a3c2e52d3c reset WTP state when going into DTLS TD 2016-03-29 11:51:39 +02:00
Andreas Schultz
7eddb74767 rework overly deep if statement in wtp_dfa_run 2016-03-29 11:51:39 +02:00
Andreas Schultz
73afba9a6d rework overly deep if statement in wtp_dfa_state_join 2016-03-29 11:51:39 +02:00
Andreas Schultz
0842a2c6f5 rework error path in dfa dtls 2016-03-29 11:51:39 +02:00
Andreas Schultz
43dde134b7 simplify if statement in wtp_dfa_state_discovery 2016-03-29 11:51:39 +02:00
Andreas Schultz
4117ab1f71 move discovery request generation into function 2016-03-29 11:51:39 +02:00
Andreas Schultz
e6d1472824 simplify if statement in wtp_dfa_state_datacheck 2016-03-29 11:48:28 +02:00
Andreas Schultz
1091aa0830 simplify if statement in wtp_dfa_state_configure 2016-03-29 11:48:28 +02:00
Andreas Schultz
f85928e0b0 rework error exits path to simplify if statement 2016-03-29 11:48:28 +02:00
Andreas Schultz
e92c257ac4 move deep if statement in wtp_send_configure into function 2016-03-29 11:48:28 +02:00
Andreas Schultz
13ef6c0d62 rework deep indented if statement in wtp_dfa_retransmition_timeout 2016-03-29 11:48:28 +02:00