Commit Graph

361 Commits

Author SHA1 Message Date
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 b80073b756 inject 802.11 frames through the normal device queue 2016-02-25 12:39:19 +01:00
Andreas Schultz 0c19932b58 send 802.3 frames through the normal device TX path
Injecting 802.11 frames underneath the device logic bypasses
the queue logik and leads to delay. Pass 802.3 frames through
the normal device TX chain.

This has the added benefit that AF_PACKET sockets (e.g. tcpdump)
see the send frames.
2016-02-22 16:56:03 +01:00
Andreas Schultz f3119eec8d rework kernel socket handling to use udp tunnel infrastructure
Reimplmenting what is already there doesn't make sense. Switch
to the existing and UDP tunnel support code and handle the data
channel as a connected UDP socket
2016-02-22 16:54:54 +01:00
Andreas Schultz cc5b38f322 impelment station binding to wlanid
* add a kernel bash hash list to track station to
  radio and wlan id binding
* enforce binding on recv
* configure binding through netlink interface from
  WTP process
2016-02-18 19:36:22 +01:00
Andreas Schultz a6d0efe91a wtp: rework kernel socket handling
Switch to a connected UDP kernel socket. Comparing the
local and remote IPs is no longer required and handling
different IP versions and UDP types is automatic.

The WTP logic needs to reopen the socket on demand now.
2016-02-18 15:06:39 +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 3a9a673d71 register pernet support befor anything else 2016-02-08 17:33:31 +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 385832a010 start with network namespace support
This is incomplete. There are several places left where a global
variable is used (e.g. there can only be one AC session).
2016-02-05 17:43:15 +01:00
Andreas Schultz 69ca3d3256 change __genl_const to const
__genl_const was depreciated some time ago.
2016-02-05 17:42:43 +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 58c63bbc4e Fix error in retrasmisson packets 2016-02-05 17:33:09 +01:00
vemax78 729ed4f768 Use the capwap_exit instead of exit 2015-01-24 13:17:47 +01:00
vemax78 8042cd2e04 Merge 2015-01-24 13:14:05 +01:00
Alexis La Goutte 28112ee228 Fix Branch condition evaluates to a garbage value found by Clang Analyzer
---
 src/ac/ac_backend.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
2015-01-22 10:19:38 +01:00
Alexis La Goutte 63189997df Fix Uninitialized argument value found by Clang Analyzer
(Need to be confirmed)
---
 src/ac/ac_dfa_join.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
2015-01-22 10:19:38 +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 49f7ba41df Fix Dead Store (Dead increment) found by Clang Analyzer
---
 src/wtp/binding/ieee80211/wifi_drivers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2015-01-22 10:19:38 +01:00
Alexis La Goutte d12d15d67d Fix Dead Store (Dead Assignment) found by Clang Analyzer
---
 src/wtp/wtp_dfa.c | 2 --
 1 file changed, 2 deletions(-)
2015-01-22 10:19:38 +01:00
Alexis La Goutte e5f1fbd992 Fix Dead Store (Dead Assignment) found by Clang Analyzer
---
 src/wtp/binding/ieee80211/wifi_nl80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
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
Alexis La Goutte addf009bae Fix equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] when build with Clang
---
 src/wtp/wtp_dfa_discovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2015-01-22 10:19:38 +01:00
vemax78 32a25aa34e Remove printk 2015-01-11 22:17:59 +01:00
vemax78 5fb61094d7 Update patch to last trunk version of OpenWRT/Compat Wireless 2015-01-06 22:56:10 +01:00
vemax78 c7fa31ce56 Fix data channel defrag 2015-01-04 21:31:25 +01:00
vemax78 ceb6ee2322 Fix data channel defrag 2015-01-04 21:30:28 +01:00
vemax78 21ffd7cd23 Fix data channel fragmentation 2014-12-28 20:49:21 +01:00
vemax78 0c27172ca6 Separate netlink socket for receive message and send event 2014-12-28 16:14:19 +01:00
vemax78 b05d6631f4 Fix reset data session 2014-12-28 15:53:11 +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 f05c7acdcf Fix sequence number of control messages 2014-12-27 19:10:08 +01:00
vemax78 2894b2c7aa Fix error management to send socket functions 2014-12-27 18:45:09 +01:00
vemax78 98069694c5 Teardown connection if receive packet in unknown state 2014-12-26 15:37:30 +01:00
vemax78 6b1deb48aa Remove debug dump 2014-12-26 14:55:09 +01:00
vemax78 80b1780d92 Add critical section on netlink send message 2014-12-24 13:31:24 +01:00
vemax78 33ea96d9f5 Added functionality into capwap data channel kernel module 2014-12-23 21:12:25 +01:00
vemax78 e2dea6b3de Improved session management into kernel module. A session is now indexed by
ip address and session id.
2014-10-20 19:53:32 +02: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 63f5fcea19 Fix fragment error
Add stub for virtual interfaces of data packet
2014-09-21 11:20:35 +02:00
vemax78 8d9985fdea The capwap data channel migrated from userspace to kernalspace 2014-09-10 21:58:23 +02:00
vemax78 71006a9121 Fix minor bug.
Add draft of ac kernel module.
2014-06-15 09:09:48 +02:00
vemax78 2d6c4c4dd8 Check netlink file descriptor only if receive IEEE 802.11 packets in usermode. 2014-06-14 14:52:02 +02:00
vemax78 c3865e4cbb Change WTP Kernel Module path 2014-06-10 22:34:38 +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 92c86462dc Created a patch for mac80211 that allows to capture the raw IEEE80211 packets
(management, control, data) of one or more wireless interfaces.
Not necessary the monitor interface. The patch allows to discriminate which
IEEE802.11 types and IEEE802.11 subtypes capture.
2014-06-04 22:58:34 +02:00
vemax78 0ebf1a434f Add skeleton code for CAPWAP Data Channel kernel module.
The IEEE802.11 data packets will embedded into CAPWAP Data Channel directly in
kernel mode. The CAPWAP Data Channel in usermode be used only for compatibility
reasons.
2014-06-01 16:32:30 +02:00
vemax78 289fbe01c7 Fix error into wifi change frequency 2014-05-28 22:49:03 +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
vemax78 e1023a388e Add business logic of Authentication/Association in SplitMAC mode. 2014-04-25 22:05:36 +02:00
vemax78 d4d7649f3b Removed the necessity of having to calculate each time the string of
macaddress stations.
2014-04-23 22:39:19 +02:00
vemax78 1c810c2d72 Fix disconnect station in local mac.
Fix management of AC IEEE802.11 management packet to station.
2014-04-23 22:11:24 +02:00
vemax78 ebb4eb0c98 Fix function/variable name
Prepared to management the IEEE802.11 Management Frame coming from the AC.
2014-04-22 23:02:49 +02:00
vemax78 7668ab7c7c Moved the management of the AP and Stations from nl80211 driver to generic wifi. 2014-04-21 23:16:56 +02:00
vemax78 fbd717b779 Added Delete Station Message Element into Station Configuration Message. 2014-04-15 22:26:31 +02:00
vemax78 21661277a0 Add station timer. Fix multiple bug. 2014-04-15 21:59:35 +02:00
vemax78 3e06393469 Change the location of binding file. 2014-04-15 16:45:39 +02:00
vemax78 3569267283 Big update with type fix and minor new function.
Complete the IEEE802.11 Station Association with interation of AC in LocalMAC mode.
After the IEEE802.11 Authorization / Association is complete, the AC can now
authorize the WTP to accept data station packets with Station Configuration Message.
2014-04-14 22:33:12 +02:00
vemax78 2ec98ac74d Prepare for add station configuration message 2014-04-09 19:25:08 +02:00
vemax78 127d2f944c Removed obsolete functions 2014-04-09 18:45:22 +02:00
vemax78 539fa51e69 Fix functions and logic.
Add new functions
Add logic into AC for create/destroy station
2014-04-06 17:02:31 +02:00
vemax78 ae97e96f57 Started implementing the packet management of IEEE802.11 by AC side.
Made it clear some constants.
2014-04-02 22:40:04 +02:00
vemax78 7fd2d4357a Preparations to parse IEEE802.11 management packets 2014-03-26 21:35:52 +01:00
vemax78 4c466d68be Added the function to extract the frame from CAPWAP data packet 2014-03-23 22:24:59 +01:00
vemax78 bb85dc3e23 Fix value of IEEE802.11 MTU 2014-03-23 22:23:20 +01:00
vemax78 884130dff1 Fix packetlength value when packet is fragment 2014-03-23 21:59:57 +01:00
vemax78 eee74744d0 Changed the scope of stations. Now the stations are managed on a global level. 2014-03-23 20:42:59 +01:00
vemax78 0873967b88 Fix code 2014-03-22 21:31:09 +01:00
vemax78 b48f7793cf First steps to handling stations timeout 2014-03-20 20:32:49 +01:00
vemax78 1a3e02ac50 Fix param type 2014-03-20 20:22:17 +01:00
vemax78 3dff1dc28b Remove assertion and permit to call timeout functions with unset index timeout 2014-03-16 22:10:28 +01:00
vemax78 684a829158 Added the ability to manage timeouts inside the wireless module 2014-03-16 21:36:01 +01:00
vemax78 738a5d9c93 The IEEE 802.11 Management packages can be sent into CAPWAP Data Channel only
in native format
2014-03-16 21:34:29 +01:00
vemax78 72dc064a23 Fix warning "value computed is not used" when call BIO_dgram_get_peer and
BIO_dgram_set_peer.

Issue signaled by Udaya Bhaskar Reddy Panditi
2014-03-16 12:48:40 +01:00
vemax78 6042161d75 Reengineering the timeout manager. Allows to create an arbitrary number of timer
with the possibility to invoke a callback function on timeout.
2014-03-02 19:31:27 +01:00
vemax78 aa87719432 Move capwap timeout functions into new file 2014-02-20 21:34:41 +01:00
vemax78 2bdcac10ba Change file position of some ieee80211 functions 2014-02-20 21:23:18 +01:00
vemax78 ea02d7379e Refactoring timeout functions, change functions name and add timeout handler
into session.
2014-02-19 19:16:33 +01:00
vemax78 dff6ecb5e0 Removed unnecessary logging messages 2014-02-16 19:17:21 +01:00
vemax78 6590c50f5a Fix 2014-02-16 18:59:29 +01:00
vemax78 fd0805ff5c Fix debug log 2014-02-16 15:41:59 +01:00
vemax78 4c1a532221 Fix validation data packet 2014-02-16 15:41:44 +01:00
vemax78 5db686194c Merge 2014-02-16 15:29:08 +01:00
vemax78 196d165119 First actions to send managements frame into data channel 2014-02-16 15:28:27 +01:00
Alexis La Goutte 30f6c9fa9e Fix build
../../src/common/capwap_logging.c: In function ‘capwap_logging_printf’:
../../src/common/capwap_logging.c:124:4: error: format not a string literal and no format arguments [-Werror=format-security]
    fprintf(output, prefix);
    ^
2014-02-15 11:54:47 +01:00
vemax78 e1e4748367 The preparation for sending IEEE802.11 management packets to the AC by data
channel. Support both Local Mac and Split Mac.
2014-02-09 21:55:10 +01:00
vemax78 152f869354 Add support to Probe response offload 2014-02-09 18:42:15 +01:00
vemax78 025880583c Changed the management of the wireless interfaces, from creation to usage.
The virtual interfaces are created at the startup of the wtp to reduce the time
required to configure a wireless interface.
Applied some patches to build the WTP on OpenWRT trunk
2014-02-08 18:03:38 +01:00
vemax78 64a8bdfa1e Fix code 2014-01-23 21:24:45 +01:00
vemax78 0790fb511a Improved the management of authentication and association of the stations 2014-01-21 19:54:59 +01:00
vemax78 42293aad04 Fix capability mask 2014-01-19 21:25:22 +01:00
vemax78 254ef26ed6 Added ACL of stations 2014-01-18 19:13:10 +01:00
vemax78 9dbd940a00 Update capwap hash 2014-01-18 19:11:07 +01:00
vemax78 e342d5c1a3 Fix capwap_clone function type 2014-01-18 19:10:27 +01:00
vemax78 81284d4c62 Add Hash data type with AVL tree list 2014-01-17 19:01:01 +01:00
vemax78 547e398924 Add code to simple management IEEE802.11 Association Request/Response packets.
Need more code for complete the management of station association.
2014-01-14 19:15:58 +01:00
vemax78 bc2a6183ce Add code to simple management IEEE802.11 Authentication packets 2014-01-13 19:00:51 +01:00
vemax78 b4a95beb89 Update IEEE802.11 Information Element
Add control check length into IE parsing function
2014-01-10 17:53:12 +01:00
vemax78 d2c01ad82a Improved the management of the IEEE802.11 Beacon and add the management of
IEEE802.11 Probe Response.
2014-01-10 13:25:28 +01:00
vemax78 66019df158 Send only one from DSSS and OFDM Control Message Element 2014-01-07 16:22:44 +01:00
vemax78 022585f3a1 Add nl80211 handler message events 2013-12-21 23:50:15 +01:00
vemax78 938f73cd80 Remove old files 2013-12-20 23:15:01 +01:00
vemax78 bef31786ce The first beacon of SmartCAPWAP 2013-12-20 23:14:34 +01:00
vemax78 29ba25e434 Add helper function 2013-12-14 12:32:42 +01:00
vemax78 dcbf837b7a Add basic function for management wlan configuration 2013-12-07 18:14:32 +01:00
vemax78 64784fb460 Fix code 2013-12-07 18:13:42 +01:00
vemax78 7253e60aed Fix code and improve wlan configuration functionality 2013-12-04 22:25:16 +01:00
vemax78 e095195c97 Fix code 2013-12-01 22:51:42 +01:00
vemax78 0fa34f80da First code for management AddWLAN 2013-12-01 22:51:26 +01:00
vemax78 e02815f576 Cleaning code 2013-12-01 22:50:33 +01:00
vemax78 b2b18fec33 Add management Notify Event for Request/Response control message 2013-12-01 22:50:04 +01:00
vemax78 831d8a6184 Cancel all notify event when teardown connection 2013-12-01 22:48:38 +01:00
vemax78 1459c78143 Missing IEEE802.11 Request Control Message 2013-12-01 22:45:57 +01:00
vemax78 91bc075d6a Management SOAP Comet Notify Event 2013-11-24 23:02:09 +01:00
vemax78 d303f057f0 Free backend management resource after close all sessions 2013-11-24 23:00:57 +01:00
vemax78 e320bef6a7 Type change 2013-11-24 19:20:33 +01:00
vemax78 33099da3b7 Rename message queue functions 2013-11-24 17:09:07 +01:00
vemax78 f0c5146563 Improve management SOAP request/response with Director 2013-11-24 16:36:08 +01:00
vemax78 bb44612672 Cleaning wrong comment 2013-11-24 16:35:28 +01:00
vemax78 ebb0ca0dd3 Helper function for convert from int/long to string 2013-11-24 16:34:54 +01:00
vemax78 26b9a9e0fa Fix lock destroy 2013-11-24 14:45:45 +01:00
vemax78 d7b306e432 Add timeout in session data 2013-11-23 22:30:28 +01:00
vemax78 909899526c Change COMET idevent from string to int 2013-11-23 22:30:08 +01:00
vemax78 68f14a8aca Notify event request atomic block of memory 2013-11-21 22:03:05 +01:00
vemax78 0747168361 Separate the control channel from data channel on two different threads.
Solved the DTLS problem of using a separate thread for the data channel.
2013-11-20 23:12:00 +01:00
vemax78 9a6589b636 Into multithread logging also threadid 2013-11-19 23:25:07 +01:00
vemax78 df4161dae7 Add management backend for close WTP sessions or reset a WTP 2013-11-10 22:11:56 +01:00
vemax78 5f635602ce Add debug information into mutex calls 2013-11-10 22:10:40 +01:00
vemax78 bd6e6547b7 It is not necessary that the mutex is recursive 2013-11-10 22:10:10 +01:00
vemax78 db29a6228e Add backtrace call stack for debugging 2013-11-10 22:07:55 +01:00
vemax78 a06618afbc Fix forget unlock 2013-11-10 22:05:35 +01:00
vemax78 3eedd13d8b Remove unusable DFA state 2013-11-07 22:07:05 +01:00
vemax78 516f129fce Cleaning WTP DFA code 2013-11-07 22:06:29 +01:00
vemax78 d3b5d889ab Fix memory leak 2013-11-07 22:05:33 +01:00
vemax78 c07d643ec0 Fix DFA 2013-11-06 23:23:30 +01:00
vemax78 5e29d9241c Fix 2013-11-06 23:23:16 +01:00
vemax78 dbb8f2a621 Remove trivial assertion 2013-11-06 18:14:08 +01:00
vemax78 590b7539bf Cleaning AC DFA code 2013-11-05 17:54:29 +01:00
vemax78 4cbff2eead Stub SOAP action 2013-11-04 18:02:10 +01:00