Commit Graph

147 Commits

Author SHA1 Message Date
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
Tobias Hintze
ad27e80521 Merge pull request #2 from nm-mrt/dns-support
Handle no DNS at system start
2016-03-25 13:16:20 +01:00
Moritz Rosenthal
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
Andreas Schultz
afd76e003d fix non-debug builds 2016-03-24 17:15:12 +01:00
Andreas Schultz
29295d1434 [ac] rename last remaining CyaSSL refrence to wolfSSL 2016-03-24 17:15:12 +01:00
Andreas Schultz
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
Andreas Schultz
730f110a25 [wtp] implement vendor specific elements 2016-03-24 17:15:11 +01:00
Moritz Rosenthal
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
Andreas Schultz
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
Andreas Schultz
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
Andreas Schultz
38f7681608 constify capwap_message_elements_ops 2016-03-07 18:25:49 +01:00
Andreas Schultz
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
Andreas Schultz
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
Andreas Schultz
78a8a75c6b start 802.11n 2016-03-07 16:23:49 +01:00
Andreas Schultz
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
Andreas Schultz
2b489947c2 add support for setting the STA WME fields from WMM 2016-03-03 16:44:15 +01:00
Andreas Schultz
4d56938321 reindent ieee80211_retrieve_information_elements_position 2016-03-03 15:27:29 +01:00
Andreas Schultz
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
Andreas Schultz
484002b3e6 add support for CAPWAP IEEE 802.11 Information Element to AssocResponse 2016-02-29 15:30:54 +01:00
Andreas Schultz
a85f07f18a change buffer data type in hexdump logging to unsigned char 2016-02-29 15:30:19 +01:00
Andreas Schultz
e4a5abba65 add support for CAPWAP IEEE 802.11 Information Element 2016-02-29 14:32:02 +01:00
Andreas Schultz
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
Andreas Schultz
3bfd0c5642 logging: add alternate log syntax 2016-02-29 14:23:58 +01:00
Andreas Schultz
c66dc85c04 add hexdump log formater 2016-02-29 14:23:41 +01:00
Andreas Schultz
cae859e42f [debug] add debug trace logging for some procedures 2016-02-17 11:56:03 +01:00
Andreas Schultz
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
Andreas Schultz
1ee42c1881 unsigned long is 64bit on some platforms, use the 32bit datatype instead 2016-02-08 17:33:00 +01:00
Andreas Schultz
f6711c3b14 Vendor Payload can appear multiple times, make it a list element 2016-02-08 17:31:40 +01:00
Andreas Schultz
8c20d78941 remove dos style newlines 2016-02-05 17:38:49 +01:00
Andreas Schultz
93cb64ca6f convert (partially) to wolfssl 2016-02-05 17:33:57 +01:00
Andreas Schultz
7e0b977fcd fix strict aliasing errors 2016-02-05 17:33:57 +01:00
vemax78
729ed4f768 Use the capwap_exit instead of exit 2015-01-24 13:17:47 +01:00
Alexis La Goutte
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
Alexis La Goutte
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
Alexis La Goutte
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
vemax78
5fb61094d7 Update patch to last trunk version of OpenWRT/Compat Wireless 2015-01-06 22:56:10 +01:00
vemax78
7c9ecebe7d Add debug output messages 2014-12-28 15:48:52 +01:00
vemax78
b64d563e33 Fix macro 2014-12-28 15:48:15 +01:00
vemax78
2894b2c7aa Fix error management to send socket functions 2014-12-27 18:45:09 +01:00
vemax78
8937ded1d3 Improved the management of soap request/response.
The director has the opportunity to change the configuration of AC in join
connection. The virtual interfaces which encapsulate the wifi stations is
managed dynamically by the Director.
The AC must request authorization from Director for associate a station.
2014-10-19 21:37:22 +02:00
vemax78
8d9985fdea The capwap data channel migrated from userspace to kernalspace 2014-09-10 21:58:23 +02:00
vemax78
089a044f3f Fix capwap protocol and optional wireless information header.
Complete IEEE802.11 frames tunnel WTP side.
Now WTP can send data packets to the AC.
2014-06-09 22:30:04 +02:00
vemax78
67daa8dcbb Permit to forward IEEE802.11 Data Packet from kernel space to user space bypass
kernel network stack.
2014-06-07 22:37:19 +02:00
vemax78
3573dd4251 Removing the OpenSSL library for CyaSSL.
OpenSSL license was not compatible with the GPL license.
2014-05-15 21:43:21 +02:00