Commit Graph

154 Commits

Author SHA1 Message Date
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
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
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
651ccc0d33 rework debug output to be more helpful for radio config failures 2016-04-29 08:32:49 +02:00
baf1ccbc73 add Vendor TP WTP Timestamp to Echo Request 2016-04-08 15:18:53 +02:00
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
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
3761122c83 Bugfix for memcmp of struct failing on PPC hardware 2016-03-31 15:54:27 +02:00
537e00d5b5 Logging to syslog is standard in Linux environment and should be used. 2016-03-30 16:37:35 +02:00
29ed6544c5 switch everything to new log API and drop old one 2016-03-30 14:47:57 +02:00
dd6f6fcfe2 add format string atrribute to logging and fix all error found by it 2016-03-30 14:30:27 +02:00
cadbfa3d7e switch to more a syslog like logging style 2016-03-30 14:29:53 +02:00
9572de350a switch timeout processing to libev
Rework the timeout and network code to use libev.
2016-03-30 14:06:43 +02:00
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
ad27e80521 Merge pull request #2 from nm-mrt/dns-support
Handle no DNS at system start
2016-03-25 13:16:20 +01:00
f9bb716dac Changed name of addr_capwap.socket to addr_capwap.sockaddr
Changed FQDN size from 128 to 256 according to RFC1035
2016-03-25 12:41:43 +01:00
afd76e003d fix non-debug builds 2016-03-24 17:15:12 +01:00
29295d1434 [ac] rename last remaining CyaSSL refrence to wolfSSL 2016-03-24 17:15:12 +01:00
2109c62b80 implement basic 802.11n support
Add suport to enable 80211n support on the BSS and set
station parameters through the "Add Station" procedure.

Setting 802.11n radio parameters is rudementary and does
not work yet.
2016-03-24 17:15:11 +01:00
730f110a25 [wtp] implement vendor specific elements 2016-03-24 17:15:11 +01:00
7b9f515bd7 If there is no DNS available on system start the capwap-wtp will stop while evaluating the configuration. I fixed that by checking if the address was yet translated on every address access. If not a DNS request is started before continuing. 2016-03-24 07:09:29 +01:00
471d1058c4 [wtp] prepare message elements for vendor element handling
convert message element type into a struct{ vendor, type }.
Vendor will be 0 for all RFC types.
2016-03-08 10:21:51 +01:00
140be9b143 simplify element list handling
Doing all the work to create a list element only to fail when we can
not decode the element is a waste of effort.
Decode the element first and only on success handle the list operations.
2016-03-07 18:25:49 +01:00
38f7681608 constify capwap_message_elements_ops 2016-03-07 18:25:49 +01:00
627a38a556 move the category setting into the element ops
this prepares the element ops for decoding vendor
ies into seperate types.

It also makes sense to keep all information about a IE
in one place.
2016-03-07 18:09:13 +01:00
1436fc9e5f rename overly verbose capwap_message_elements_ops
The struct is already conveys the scope of the operations,
repeating it in the name of ops again is redundant and
bloats the resulting source code.

Rename the opt to shorter versions.
2016-03-07 17:12:48 +01:00
78a8a75c6b start 802.11n 2016-03-07 16:23:49 +01:00
667d7a59e7 transition to WolfSSL API
Rename all remaining CyaSSL API references to WolfSSL.
Newer WolfSSL have significant DTLS fixes and security
improvements. Continuing to support old CyaSSL releases
would impact the perfomance of encrypted WTP sessions.
2016-03-07 15:32:36 +01:00
2b489947c2 add support for setting the STA WME fields from WMM 2016-03-03 16:44:15 +01:00
4d56938321 reindent ieee80211_retrieve_information_elements_position 2016-03-03 15:27:29 +01:00
8dc30ae3c4 rework socket and discovery handling
Swtich sockets to connected when talking to a specific AC. Use
unconnected UDP sockets only during DISCOVERY.

In JOIN, we need send our local address. The old, routing table
based local address discovery is broken for many reasons (VRF,
policy routing, ...). With a connected socket, we can the same
information with a simple getsockname.

During DISCOVERY we are talking to all potential AC's at once.
So using an unconnected socket makes still sense.
2016-03-02 15:13:56 +01:00
484002b3e6 add support for CAPWAP IEEE 802.11 Information Element to AssocResponse 2016-02-29 15:30:54 +01:00
a85f07f18a change buffer data type in hexdump logging to unsigned char 2016-02-29 15:30:19 +01:00
e4a5abba65 add support for CAPWAP IEEE 802.11 Information Element 2016-02-29 14:32:02 +01:00
9fee37a994 rework wifi type and rate logic
Hard coding basic rates is wrong. Each Wifi types does expect
some default basic rates. However those rates are not set in
stone and the AC is permited to set then to whatever it deems
ok. This might prevent client from connecting, but it still is
the AC decission to do so.

This is first step towards a more flexible basic rate handling.
2016-02-29 14:26:13 +01:00
3bfd0c5642 logging: add alternate log syntax 2016-02-29 14:23:58 +01:00
c66dc85c04 add hexdump log formater 2016-02-29 14:23:41 +01:00
cae859e42f [debug] add debug trace logging for some procedures 2016-02-17 11:56:03 +01:00
c71a9db6ed remove IEEE 802.11 WTP Radio Information from responses
RFC 5416 does require IEEE 802.11 WTP Radio Information for
Discovery and Join Response Messages in Chapter 5. However
Chapter 6.25 indicates that this IE should only be included
in the request messages.
2016-02-17 11:52:59 +01:00
1ee42c1881 unsigned long is 64bit on some platforms, use the 32bit datatype instead 2016-02-08 17:33:00 +01:00
f6711c3b14 Vendor Payload can appear multiple times, make it a list element 2016-02-08 17:31:40 +01:00
8c20d78941 remove dos style newlines 2016-02-05 17:38:49 +01:00
93cb64ca6f convert (partially) to wolfssl 2016-02-05 17:33:57 +01:00
7e0b977fcd fix strict aliasing errors 2016-02-05 17:33:57 +01:00
729ed4f768 Use the capwap_exit instead of exit 2015-01-24 13:17:47 +01:00
4d1b60a6c1 Fix Dead Store (Dead increment) found by Clang Analyzer
---
 src/common/binding/ieee80211/ieee80211.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
2015-01-22 10:19:38 +01:00
3a51803eba Fix Dead Store (Dead Assignment) found by Clang Analyzer
---
 src/common/capwap_protocol.c | 2 --
 1 file changed, 2 deletions(-)
2015-01-22 10:19:38 +01:00
1ba7fc2355 Add exit(1) when ASSERT()
Move to 520 issues found by Clang Analyzer to only 18 !
---
 src/common/capwap_debug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2015-01-22 10:19:38 +01:00
5fb61094d7 Update patch to last trunk version of OpenWRT/Compat Wireless 2015-01-06 22:56:10 +01:00
7c9ecebe7d Add debug output messages 2014-12-28 15:48:52 +01:00