Commit Graph

1400 Commits

Author SHA1 Message Date
Jouni Malinen 0456ea16d8 eloop: Remove global user data pointer
This is not really needed since all signal handlers can use a context
pointer provided during signal handler registration.
2009-12-19 19:22:16 +02:00
Jouni Malinen 9969e5a46a Make hostapd_for_each_interface() take context pointer as argument
This removes need for using eloop_get_user_data().
2009-12-19 19:07:31 +02:00
Jouni Malinen 2988796257 Fix RADIUS client to cancel IPv6 socket read notifications 2009-12-19 18:52:42 +02:00
Jouni Malinen f481459f5e Fix RADIUS server deinit to cancel timeout for session removal 2009-12-19 18:52:15 +02:00
Jouni Malinen 930f704aac Add backtrace support for debugging
WPA_TRACE=y can now be used to enable internal backtrace support that
will provide more details about implementation errors, e.g., when some
resources are not released correctly. In addition, this will print out
a backtrace automatically if SIGSEGV is received.
2009-12-19 18:40:54 +02:00
Jouni Malinen f5d4a8ead4 eapol_test: Fix build after RADIUS msg API changes 2009-12-19 18:40:11 +02:00
Jouni Malinen 1489e11a94 Make struct radius_msg private to radius.c
This is internal data structure for RADIUS message handling and
external code should not touch it directly.
2009-12-19 17:26:57 +02:00
Jouni Malinen aa235d2ef7 Convert RADIUS message code to use wpabuf internally 2009-12-19 17:12:07 +02:00
Jouni Malinen 9e7245bdb4 Change radius_msg_free() to free the buffer
Since all callers were freeing the buffer immediately anyway, move
this operation into radius_msg_free() to reduce code size.
2009-12-19 16:34:41 +02:00
Jouni Malinen d94f86d85e RADIUS message initialization cleanup 2009-12-19 16:20:53 +02:00
Jouni Malinen d04a96b0d6 Add documentation for RADIUS code and some minor cleanup 2009-12-19 16:13:06 +02:00
Jouni Malinen a9f92c487f WPS: Remove parent pointer from advertisement state machine 2009-12-19 14:51:36 +02:00
Jouni Malinen 158aff0035 WPS: Convert struct advertisement_state_machine to use struct dl_list 2009-12-19 14:46:52 +02:00
Jouni Malinen ea8f09acb2 WPS: Remove unused struct subscr_addr parent pointer 2009-12-19 14:30:49 +02:00
Jouni Malinen f1de40f728 WPS: Convert struct wps_event_ to use struct dl_list 2009-12-19 14:29:01 +02:00
Jouni Malinen ec32c29471 WPS: Convert struct subscription to use struct dl_list 2009-12-19 14:15:43 +02:00
Jouni Malinen f98b440c47 WPS: Convert struct subscr_addr to use dl_list 2009-12-19 13:47:00 +02:00
Jouni Malinen dacf478352 Add generic doubly-linked list implementation 2009-12-19 13:43:25 +02:00
Jouni Malinen d2e6100c16 Fix xcode build (eap_register.c needs to be included) 2009-12-18 21:58:23 +02:00
Masashi Honma 1c9c03d08d Mac OS X: Fix driver_osx.c build 2009-12-18 21:25:21 +02:00
Snowpin Lee 649b28f9e6 ralink: Add WPS support 2009-12-18 21:04:11 +02:00
Jouni Malinen a6fc4f3c82 Change Linux driver wrappers to use shared netlink receive code 2009-12-18 18:24:13 +02:00
Jouni Malinen 62d680c3ca netlink: Move more of the newlink/dellink parsing into shared code 2009-12-18 17:49:07 +02:00
Jouni Malinen f37cf89ccb netlink: Use NLMSG_OK and NLMSG_NEXT macros 2009-12-18 17:22:35 +02:00
Jouni Malinen 08063178fb nl80211/wext: Share netlink new/del link event receive code 2009-12-18 17:11:54 +02:00
Jouni Malinen e2d02c29b5 driver_nl80211/wext: Share netlink operstate send function
As an initial step in sharing netlink helper functions among driver
wrappers, create a new file for netlink code and move operstate send
function there.
2009-12-18 16:35:33 +02:00
Jouni Malinen 3b31db5199 Fix netlink payload length calculation
nlmsghdr length needs to be removed from payload length. [Bug 341]
2009-12-18 16:14:54 +02:00
Jouni Malinen 0e15e529eb Show current mode (station/AB/IBSS) in status 2009-12-16 16:02:38 +02:00
Jouni Malinen 67f0112d83 driver_test: Fix AP mode to initialize bss_ctx for first interface 2009-12-16 16:01:54 +02:00
Jouni Malinen c302f20740 Initialize new_connection = 1 to fix wpa_supplicant AP mode operstate
When setting up an AP with wpa_supplicant, the initial connection was
not necessarily setting oper state from DORMANT to UP which would be
blocking normal data frames. Fix this by initializing new_connection
to 1 so that even the first change to COMPLETED state will end up
setting oper state.
2009-12-15 13:17:56 +02:00
Jouni Malinen cdc7f66bda Fix driver_nl80211.c build without CONFIG_CLIENT_MLME 2009-12-14 21:13:58 +02:00
Jouni Malinen d986b1b6c1 OpenSSL: Silence "Failed to read possible Application Data"
This message from tls_connection_handshake() is not really an error in
most cases, so do not show it if there was indeed no Application Data
available (which is a normal scenario and not an indication of any
error).
2009-12-14 16:09:20 +02:00
Jouni Malinen b57e086cc1 Mark management frame processing functions to use const buffer 2009-12-13 23:25:30 +02:00
Jouni Malinen ba091c06c5 Mark ieee802_11_parse_elems() input and parsed elems const
In addition, re-order IE pointers and u8 length so that the shorter
length fields are together to allow compiler to optimize structure size.
2009-12-13 23:11:11 +02:00
Jouni Malinen f8b1f69561 Use generic driver events for TX status and RX reporting
Replace driver wrapper calls to hostapd_tx_status(),
hostapd_rx_from_unknown_sta(), hostapd_mgmt_rx(), and
hostapd_mgmt_tx_cb() with new generic driver events
EVENT_TX_STATUS, EVENT_RX_FROM_UNKNOWN, and EVENT_RX_MGMT.

This cleans up lot of the driver wrapper code to be less dependent
on whether it is being used within wpa_supplicant AP mode or hostapd.
2009-12-13 23:05:39 +02:00
Jouni Malinen 1b648c7e1a nl80211: Remove some of the unnecessary conditional compilation
These functions can be built for both hostapd and wpa_supplicant.
2009-12-13 21:49:53 +02:00
Jouni Malinen fcf0f87d97 Replace hostapd_button_pushed() with generic driver event 2009-12-13 21:21:10 +02:00
Jouni Malinen f2dab64ee3 Fix EVENT_FT_RRB_RX processing 2009-12-13 21:19:02 +02:00
Jouni Malinen 1cd973d501 Replace hostapd_michael_mic_failure() with generic driver event 2009-12-13 21:17:11 +02:00
Jouni Malinen ac7043f265 Fix VS project files to match with source code file changes 2009-12-13 21:01:52 +02:00
Jouni Malinen 85cc05110d driver_test: Merge drv->hapd into drv->ctx
A separate struct hostapd_data pointer is not really needed anymore
and the generic context pointer can be used instead.
2009-12-13 18:57:57 +02:00
Jouni Malinen 8043e72589 Add BSS ctx to if_add() driver op
This remove the need from driver_test.c to go through internal hostapd
structures to find the appropriate BSS when reporting events on secondary
BSSes.
2009-12-13 18:54:11 +02:00
Jouni Malinen 9b5d2b8b9c Merge hostapd/sta_flags.h into sta_info.h
The separate header file is not needed since none of the driver wrappers
include it anymore. Move the WLAN_STA_* definitions back to be together
with struct sta_info definition.
2009-12-13 11:41:46 +02:00
Jouni Malinen 0de39516ae Map STA flags into values defined in driver.h
This removes need for including hostapd/sta_flags.h into driver
wrappers and removes any remaining dependencies between driver flags
and internal hostapd flags.
2009-12-13 11:35:39 +02:00
Jouni Malinen a34325dde9 Remove unneeded hostapd_wmm_sta_config()
The WMM STA flag is already taken care of by handle_assoc_cb() and there
is no point trying to do this unless hostapd is taking care MLME
processing, so no need to call this from drv_callbacks.c.
2009-12-13 11:14:21 +02:00
Jouni Malinen 60c8cfb4fb Remove usused flags parameter from sta_add() driver op 2009-12-13 11:05:22 +02:00
Jouni Malinen c9b9e494fc driver_bsd: Fix build after previous commit 2009-12-12 23:55:09 +02:00
Jouni Malinen af586419fd Add more WPA/IEEE 802.1X parameters into set_ieee8021x() driver op
This gets rid of the need to touch internal hostapd data structures
directly from the driver wrappers.
2009-12-12 23:50:29 +02:00
Jouni Malinen ff2a74eeb1 driver_bsd: Fix build (eapol_sm.h is not needed anymore) 2009-12-12 23:33:43 +02:00
Jouni Malinen e3bd3912ca Change set_ieee8021x driver op to use parameters structure
This makes it easier to extent the set of parameters passed to
this driver wrapper function.
2009-12-12 23:32:44 +02:00