libeap.git
14 years agoDescribe tracing build options for developers
Jouni Malinen [Sun, 20 Dec 2009 21:41:06 +0000 (23:41 +0200)]
Describe tracing build options for developers

14 years agoAdd option libbfd support for tracing code
Jouni Malinen [Sun, 20 Dec 2009 21:35:06 +0000 (23:35 +0200)]
Add option libbfd support for tracing code

CONFIG_WPA_TRACE=y and CONFIG_WPA_TRACE_BFD=y can now be used to get
even more complete symbols (func/file/line and inline functions) for
backtraces.

14 years agoGnuTLS: Implement tls_connection_enable_workaround()
Jouni Malinen [Sun, 20 Dec 2009 20:08:54 +0000 (22:08 +0200)]
GnuTLS: Implement tls_connection_enable_workaround()

14 years agoGnuTLS: Add support for piggybacked Application Data
Jouni Malinen [Sun, 20 Dec 2009 20:07:59 +0000 (22:07 +0200)]
GnuTLS: Add support for piggybacked Application Data

14 years agoGnuTLS: Define empty tls_connection_set_session_ticket_cb()
Jouni Malinen [Sun, 20 Dec 2009 19:37:36 +0000 (21:37 +0200)]
GnuTLS: Define empty tls_connection_set_session_ticket_cb()

This allows EAP-FAST build to be completed even if it does not actually
work yet with GnuTLS.

14 years agodbus: Fix build with "ctrl_iface_" prefix removed
Jouni Malinen [Sun, 20 Dec 2009 19:34:56 +0000 (21:34 +0200)]
dbus: Fix build with "ctrl_iface_" prefix removed

14 years agoUse wpabuf with tls_connection_ia_send_phase_finished()
Jouni Malinen [Sun, 20 Dec 2009 19:33:32 +0000 (21:33 +0200)]
Use wpabuf with tls_connection_ia_send_phase_finished()

14 years agodbus: Remove the confusing "ctrl_iface_" prefix from file names
Jouni Malinen [Sun, 20 Dec 2009 19:11:35 +0000 (21:11 +0200)]
dbus: Remove the confusing "ctrl_iface_" prefix from file names

The D-Bus interface does not really have anything to do with the
wpa_supplicant ctrl_iface interface and as such, this prefix in
dbus files is both confusing and unnecessarily. Make the file names
shorter by removing this prefix.

14 years agodbus: Move some of conditional WPS code into separate files
Jouni Malinen [Sun, 20 Dec 2009 19:04:40 +0000 (21:04 +0200)]
dbus: Move some of conditional WPS code into separate files

14 years agodbus: Remove unnecessary CONFIG_WPS ifdefs from header files
Jouni Malinen [Sun, 20 Dec 2009 18:40:23 +0000 (20:40 +0200)]
dbus: Remove unnecessary CONFIG_WPS ifdefs from header files

14 years agodbus: Clean dbus build files on wpa_supplicant 'make clean'
Jouni Malinen [Sun, 20 Dec 2009 18:29:09 +0000 (20:29 +0200)]
dbus: Clean dbus build files on wpa_supplicant 'make clean'

In addition, add preliminary build rules for build libwpadbus.a.

14 years agodbus: Rename .service file to use the service name as the file name
Jouni Malinen [Sun, 20 Dec 2009 18:15:40 +0000 (20:15 +0200)]
dbus: Rename .service file to use the service name as the file name

14 years agodbus: Add missing .service file for the new D-Bus API
Witold Sowa [Sun, 20 Dec 2009 18:14:10 +0000 (20:14 +0200)]
dbus: Add missing .service file for the new D-Bus API

14 years agoMove D-Bus related files into their own subdirectory
Jouni Malinen [Sun, 20 Dec 2009 18:11:14 +0000 (20:11 +0200)]
Move D-Bus related files into their own subdirectory

14 years agoAllow TLS flags to be configured (allow MD5, disable time checks)
Jouni Malinen [Sun, 20 Dec 2009 17:28:47 +0000 (19:28 +0200)]
Allow TLS flags to be configured (allow MD5, disable time checks)

Undocumented (at least for the time being) TLS parameters can now
be provided in wpa_supplicant configuration to enable some workarounds
for being able to connect insecurely to some networks. phase1 and
phase2 network parameters can use following options:
tls_allow_md5=1
- allow MD5 signature to be used (disabled by default with GnuTLS)
tls_disable_time_checks=1
- ignore certificate expiration time

For now, only the GnuTLS TLS wrapper implements support for these.

14 years agoGnuTLS: Report certificate validation failures with TLS alert
Jouni Malinen [Sun, 20 Dec 2009 17:14:17 +0000 (19:14 +0200)]
GnuTLS: Report certificate validation failures with TLS alert

In addition, show more detailed reason for the failure in debug log.

14 years agoOpenSSL: Fix memleak in previous wpabuf changes on an error path
Jouni Malinen [Sun, 20 Dec 2009 17:12:59 +0000 (19:12 +0200)]
OpenSSL: Fix memleak in previous wpabuf changes on an error path

14 years agoCheck TLS status on EAP server during handshake
Jouni Malinen [Sun, 20 Dec 2009 17:11:43 +0000 (19:11 +0200)]
Check TLS status on EAP server during handshake

The new TLS wrapper use may end up returning alert data and we need to
make sure here that it does not end up getting interpreted as success
due to non-NULL response.

14 years agoGnuTLS: Use struct wpabuf for push/pull buffers
Jouni Malinen [Sun, 20 Dec 2009 16:31:56 +0000 (18:31 +0200)]
GnuTLS: Use struct wpabuf for push/pull buffers

14 years agoConvert TLS wrapper to use struct wpabuf
Jouni Malinen [Sun, 20 Dec 2009 16:17:55 +0000 (18:17 +0200)]
Convert TLS wrapper to use struct wpabuf

This converts tls_connection_handshake(),
tls_connection_server_handshake(), tls_connection_encrypt(), and
tls_connection_decrypt() to use struct wpa_buf to allow higher layer
code to be cleaned up with consistent struct wpabuf use.

14 years agoAdd empty FIPS PRF wrapper for CryptoAPI
Jouni Malinen [Sun, 20 Dec 2009 16:14:20 +0000 (18:14 +0200)]
Add empty FIPS PRF wrapper for CryptoAPI

14 years agoAdd empty crypto_mod_exp() wrapper for CryptoAPI.
Jouni Malinen [Sun, 20 Dec 2009 16:13:42 +0000 (18:13 +0200)]
Add empty crypto_mod_exp() wrapper for CryptoAPI.

14 years agoFix MinGW build: CertCreateCertificateContext() is now known
Jouni Malinen [Sun, 20 Dec 2009 16:10:10 +0000 (18:10 +0200)]
Fix MinGW build: CertCreateCertificateContext() is now known

14 years agoeloop_win: Fix build after eloop user_data removal
Jouni Malinen [Sun, 20 Dec 2009 15:48:55 +0000 (17:48 +0200)]
eloop_win: Fix build after eloop user_data removal

14 years agoFix lastReqData freeing to use wpabuf_free()
Jouni Malinen [Sun, 20 Dec 2009 15:22:25 +0000 (17:22 +0200)]
Fix lastReqData freeing to use wpabuf_free()

14 years agowpabuf: Add WPA_TRACE code to validate correct freeing of wpabuf
Jouni Malinen [Sun, 20 Dec 2009 11:11:31 +0000 (13:11 +0200)]
wpabuf: Add WPA_TRACE code to validate correct freeing of wpabuf

Use an extra header to move the returned pointer to break os_free()
or free() of the returned value and verify that the correct magic
is present when freeing or resizing the wpabuf. Show backtrace on
invalid wpabuf use.

14 years agowpabuf: Allow wpabuf_resize(NULL, len) to be used
Jouni Malinen [Sun, 20 Dec 2009 10:52:54 +0000 (12:52 +0200)]
wpabuf: Allow wpabuf_resize(NULL, len) to be used

This matches with realloc() usage, i.e., allocate a new buffer if no
buffer was specified.

14 years agoEAP-FAST server: Piggyback Phase 2 start with end of Phase 1
Jouni Malinen [Sun, 20 Dec 2009 09:39:45 +0000 (11:39 +0200)]
EAP-FAST server: Piggyback Phase 2 start with end of Phase 1

If Finished message from peer has been received before the server
Finished message, start Phase 2 with the same message to avoid extra
roundtrip when the peer does not have anything to send after the server
Finished message.

14 years agoWPS ER: Delay wpa_supplicant termination to allow unsubscription
Jouni Malinen [Sat, 19 Dec 2009 21:47:54 +0000 (23:47 +0200)]
WPS ER: Delay wpa_supplicant termination to allow unsubscription

Instead of forcefully deinitializing ER immediately, give it some
time to complete unsubscription and call eloop_terminate() only once
ER code has completed its work.

14 years agoWPS ER: Unsubscribe from AP events whenever removing the AP entry
Jouni Malinen [Sat, 19 Dec 2009 21:20:22 +0000 (23:20 +0200)]
WPS ER: Unsubscribe from AP events whenever removing the AP entry

Store the subscription identifier during subscription process and use
this to unsubscribe from events when removing the AP.

14 years agoWPS: Convert Registrar PIN list to use struct dl_list
Jouni Malinen [Sat, 19 Dec 2009 20:26:55 +0000 (22:26 +0200)]
WPS: Convert Registrar PIN list to use struct dl_list

14 years agohostapd_cli: Use os_program_{init,deinit}
Jouni Malinen [Sat, 19 Dec 2009 20:26:36 +0000 (22:26 +0200)]
hostapd_cli: Use os_program_{init,deinit}

14 years agoWPS ER: Convert lists to use struct dl_list
Jouni Malinen [Sat, 19 Dec 2009 20:14:06 +0000 (22:14 +0200)]
WPS ER: Convert lists to use struct dl_list

14 years agoFree readline() output with free(), not os_free()
Jouni Malinen [Sat, 19 Dec 2009 20:01:09 +0000 (22:01 +0200)]
Free readline() output with free(), not os_free()

14 years agoWPS: Remove unused net_if copy
Jouni Malinen [Sat, 19 Dec 2009 19:58:00 +0000 (21:58 +0200)]
WPS: Remove unused net_if copy

14 years agodriver_test: Use OS wrappers consistently for memory allocation
Jouni Malinen [Sat, 19 Dec 2009 19:49:51 +0000 (21:49 +0200)]
driver_test: Use OS wrappers consistently for memory allocation

14 years agoAdd memory allocation analyzer to verify OS wrapper use
Jouni Malinen [Sat, 19 Dec 2009 19:47:56 +0000 (21:47 +0200)]
Add memory allocation analyzer to verify OS wrapper use

WPA_TRACE=y builds will now verify that memory allocation in done
consistently using os_{zalloc,malloc,realloc,strdup,free} (i.e., no
mixing of os_* functions and unwrapper functions). In addition, some
common memory allocation issues (double-free, memory leaks, etc.) are
detected automatically.

14 years agohostapd: Call os_program_{init,deinit}()
Jouni Malinen [Sat, 19 Dec 2009 18:55:17 +0000 (20:55 +0200)]
hostapd: Call os_program_{init,deinit}()

14 years agoeloop: Do not use printf() or fprintf() directly
Jouni Malinen [Sat, 19 Dec 2009 18:27:55 +0000 (20:27 +0200)]
eloop: Do not use printf() or fprintf() directly

14 years agoeloop: Use struct dl_list for timeouts
Jouni Malinen [Sat, 19 Dec 2009 18:26:22 +0000 (20:26 +0200)]
eloop: Use struct dl_list for timeouts

14 years agoeloop: Remove global user data pointer
Jouni Malinen [Sat, 19 Dec 2009 17:22:16 +0000 (19:22 +0200)]
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.

14 years agoMake hostapd_for_each_interface() take context pointer as argument
Jouni Malinen [Sat, 19 Dec 2009 17:07:31 +0000 (19:07 +0200)]
Make hostapd_for_each_interface() take context pointer as argument

This removes need for using eloop_get_user_data().

14 years agoFix RADIUS client to cancel IPv6 socket read notifications
Jouni Malinen [Sat, 19 Dec 2009 16:52:42 +0000 (18:52 +0200)]
Fix RADIUS client to cancel IPv6 socket read notifications

14 years agoFix RADIUS server deinit to cancel timeout for session removal
Jouni Malinen [Sat, 19 Dec 2009 16:51:10 +0000 (18:51 +0200)]
Fix RADIUS server deinit to cancel timeout for session removal

14 years agoAdd backtrace support for debugging
Jouni Malinen [Sat, 19 Dec 2009 16:40:54 +0000 (18:40 +0200)]
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.

14 years agoeapol_test: Fix build after RADIUS msg API changes
Jouni Malinen [Sat, 19 Dec 2009 16:40:11 +0000 (18:40 +0200)]
eapol_test: Fix build after RADIUS msg API changes

14 years agoMake struct radius_msg private to radius.c
Jouni Malinen [Sat, 19 Dec 2009 15:26:57 +0000 (17:26 +0200)]
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.

14 years agoConvert RADIUS message code to use wpabuf internally
Jouni Malinen [Sat, 19 Dec 2009 15:12:07 +0000 (17:12 +0200)]
Convert RADIUS message code to use wpabuf internally

14 years agoChange radius_msg_free() to free the buffer
Jouni Malinen [Sat, 19 Dec 2009 14:34:41 +0000 (16:34 +0200)]
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.

14 years agoRADIUS message initialization cleanup
Jouni Malinen [Sat, 19 Dec 2009 14:20:53 +0000 (16:20 +0200)]
RADIUS message initialization cleanup

14 years agoAdd documentation for RADIUS code and some minor cleanup
Jouni Malinen [Sat, 19 Dec 2009 14:13:06 +0000 (16:13 +0200)]
Add documentation for RADIUS code and some minor cleanup

14 years agoWPS: Remove parent pointer from advertisement state machine
Jouni Malinen [Sat, 19 Dec 2009 12:51:36 +0000 (14:51 +0200)]
WPS: Remove parent pointer from advertisement state machine

14 years agoWPS: Convert struct advertisement_state_machine to use struct dl_list
Jouni Malinen [Sat, 19 Dec 2009 12:46:52 +0000 (14:46 +0200)]
WPS: Convert struct advertisement_state_machine to use struct dl_list

14 years agoWPS: Remove unused struct subscr_addr parent pointer
Jouni Malinen [Sat, 19 Dec 2009 12:30:49 +0000 (14:30 +0200)]
WPS: Remove unused struct subscr_addr parent pointer

14 years agoWPS: Convert struct wps_event_ to use struct dl_list
Jouni Malinen [Sat, 19 Dec 2009 12:29:01 +0000 (14:29 +0200)]
WPS: Convert struct wps_event_ to use struct dl_list

14 years agoWPS: Convert struct subscription to use struct dl_list
Jouni Malinen [Sat, 19 Dec 2009 12:15:43 +0000 (14:15 +0200)]
WPS: Convert struct subscription to use struct dl_list

14 years agoWPS: Convert struct subscr_addr to use dl_list
Jouni Malinen [Sat, 19 Dec 2009 11:47:00 +0000 (13:47 +0200)]
WPS: Convert struct subscr_addr to use dl_list

14 years agoAdd generic doubly-linked list implementation
Jouni Malinen [Sat, 19 Dec 2009 11:43:25 +0000 (13:43 +0200)]
Add generic doubly-linked list implementation

14 years agoFix xcode build (eap_register.c needs to be included)
Jouni Malinen [Fri, 18 Dec 2009 19:58:23 +0000 (21:58 +0200)]
Fix xcode build (eap_register.c needs to be included)

14 years agoMac OS X: Fix driver_osx.c build
Masashi Honma [Fri, 18 Dec 2009 19:25:21 +0000 (21:25 +0200)]
Mac OS X: Fix driver_osx.c build

14 years agoralink: Add WPS support
Snowpin Lee [Fri, 18 Dec 2009 19:04:11 +0000 (21:04 +0200)]
ralink: Add WPS support

14 years agoChange Linux driver wrappers to use shared netlink receive code
Jouni Malinen [Fri, 18 Dec 2009 16:24:13 +0000 (18:24 +0200)]
Change Linux driver wrappers to use shared netlink receive code

14 years agonetlink: Move more of the newlink/dellink parsing into shared code
Jouni Malinen [Fri, 18 Dec 2009 15:49:07 +0000 (17:49 +0200)]
netlink: Move more of the newlink/dellink parsing into shared code

14 years agonetlink: Use NLMSG_OK and NLMSG_NEXT macros
Jouni Malinen [Fri, 18 Dec 2009 15:22:35 +0000 (17:22 +0200)]
netlink: Use NLMSG_OK and NLMSG_NEXT macros

14 years agonl80211/wext: Share netlink new/del link event receive code
Jouni Malinen [Fri, 18 Dec 2009 15:11:54 +0000 (17:11 +0200)]
nl80211/wext: Share netlink new/del link event receive code

14 years agodriver_nl80211/wext: Share netlink operstate send function
Jouni Malinen [Fri, 18 Dec 2009 14:35:33 +0000 (16:35 +0200)]
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.

14 years agoFix netlink payload length calculation
Jouni Malinen [Fri, 18 Dec 2009 14:14:54 +0000 (16:14 +0200)]
Fix netlink payload length calculation

nlmsghdr length needs to be removed from payload length. [Bug 341]

14 years agoShow current mode (station/AB/IBSS) in status
Jouni Malinen [Wed, 16 Dec 2009 14:02:38 +0000 (16:02 +0200)]
Show current mode (station/AB/IBSS) in status

14 years agodriver_test: Fix AP mode to initialize bss_ctx for first interface
Jouni Malinen [Wed, 16 Dec 2009 14:01:54 +0000 (16:01 +0200)]
driver_test: Fix AP mode to initialize bss_ctx for first interface

14 years agoInitialize new_connection = 1 to fix wpa_supplicant AP mode operstate
Jouni Malinen [Tue, 15 Dec 2009 11:17:56 +0000 (13:17 +0200)]
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.

14 years agoFix driver_nl80211.c build without CONFIG_CLIENT_MLME
Jouni Malinen [Mon, 14 Dec 2009 19:13:58 +0000 (21:13 +0200)]
Fix driver_nl80211.c build without CONFIG_CLIENT_MLME

14 years agoOpenSSL: Silence "Failed to read possible Application Data"
Jouni Malinen [Mon, 14 Dec 2009 14:09:20 +0000 (16:09 +0200)]
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).

14 years agoMark management frame processing functions to use const buffer
Jouni Malinen [Sun, 13 Dec 2009 21:25:30 +0000 (23:25 +0200)]
Mark management frame processing functions to use const buffer

14 years agoMark ieee802_11_parse_elems() input and parsed elems const
Jouni Malinen [Sun, 13 Dec 2009 21:11:11 +0000 (23:11 +0200)]
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.

14 years agoUse generic driver events for TX status and RX reporting
Jouni Malinen [Sun, 13 Dec 2009 21:05:39 +0000 (23:05 +0200)]
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.

14 years agonl80211: Remove some of the unnecessary conditional compilation
Jouni Malinen [Sun, 13 Dec 2009 19:49:53 +0000 (21:49 +0200)]
nl80211: Remove some of the unnecessary conditional compilation

These functions can be built for both hostapd and wpa_supplicant.

14 years agoReplace hostapd_button_pushed() with generic driver event
Jouni Malinen [Sun, 13 Dec 2009 19:21:10 +0000 (21:21 +0200)]
Replace hostapd_button_pushed() with generic driver event

14 years agoFix EVENT_FT_RRB_RX processing
Jouni Malinen [Sun, 13 Dec 2009 19:19:02 +0000 (21:19 +0200)]
Fix EVENT_FT_RRB_RX processing

14 years agoReplace hostapd_michael_mic_failure() with generic driver event
Jouni Malinen [Sun, 13 Dec 2009 19:17:11 +0000 (21:17 +0200)]
Replace hostapd_michael_mic_failure() with generic driver event

14 years agoFix VS project files to match with source code file changes
Jouni Malinen [Sun, 13 Dec 2009 19:01:52 +0000 (21:01 +0200)]
Fix VS project files to match with source code file changes

14 years agodriver_test: Merge drv->hapd into drv->ctx
Jouni Malinen [Sun, 13 Dec 2009 16:57:57 +0000 (18:57 +0200)]
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.

14 years agoAdd BSS ctx to if_add() driver op
Jouni Malinen [Sun, 13 Dec 2009 16:54:11 +0000 (18:54 +0200)]
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.

14 years agoMerge hostapd/sta_flags.h into sta_info.h
Jouni Malinen [Sun, 13 Dec 2009 09:41:46 +0000 (11:41 +0200)]
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.

14 years agoMap STA flags into values defined in driver.h
Jouni Malinen [Sun, 13 Dec 2009 09:35:39 +0000 (11:35 +0200)]
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.

14 years agoRemove unneeded hostapd_wmm_sta_config()
Jouni Malinen [Sun, 13 Dec 2009 09:14:21 +0000 (11:14 +0200)]
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.

14 years agoRemove usused flags parameter from sta_add() driver op
Jouni Malinen [Sun, 13 Dec 2009 09:05:22 +0000 (11:05 +0200)]
Remove usused flags parameter from sta_add() driver op

14 years agodriver_bsd: Fix build after previous commit
Jouni Malinen [Sat, 12 Dec 2009 21:55:09 +0000 (23:55 +0200)]
driver_bsd: Fix build after previous commit

14 years agoAdd more WPA/IEEE 802.1X parameters into set_ieee8021x() driver op
Jouni Malinen [Sat, 12 Dec 2009 21:50:29 +0000 (23:50 +0200)]
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.

14 years agodriver_bsd: Fix build (eapol_sm.h is not needed anymore)
Jouni Malinen [Sat, 12 Dec 2009 21:33:43 +0000 (23:33 +0200)]
driver_bsd: Fix build (eapol_sm.h is not needed anymore)

14 years agoChange set_ieee8021x driver op to use parameters structure
Jouni Malinen [Sat, 12 Dec 2009 21:32:44 +0000 (23:32 +0200)]
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.

14 years agoReplace direct driver call to wpa_ft_rrb_rx() with driver event
Jouni Malinen [Sat, 12 Dec 2009 20:43:26 +0000 (22:43 +0200)]
Replace direct driver call to wpa_ft_rrb_rx() with driver event

This avoids need to include hostapd/wpa.h into the driver wrappers.

14 years agodriver_wired: Share multicast membership add/drop function
Jouni Malinen [Sat, 12 Dec 2009 20:18:37 +0000 (22:18 +0200)]
driver_wired: Share multicast membership add/drop function

14 years agodriver_wired: Remove unneeded conditional building blocks
Jouni Malinen [Sat, 12 Dec 2009 20:07:29 +0000 (22:07 +0200)]
driver_wired: Remove unneeded conditional building blocks

14 years agoRemove obsolete Prism54.org driver support (driver_prism54.c)
Jouni Malinen [Sat, 12 Dec 2009 18:52:12 +0000 (20:52 +0200)]
Remove obsolete Prism54.org driver support (driver_prism54.c)

The Prism54.org project seems have been dead for a while and it does not
look like this driver would ever be maintained again. Furthermore, it is
difficult to find a version that would work with the driver_prism54.c
wrapper and there is another driver for these card in the Linux kernel
tree.

The hostapd integration in driver_prism54.c is quite different from the
other driver wrappers and would require major effort to get it cleaned
up. Since there does not seem to be any real users for the cleaned up
version, there does not seem to be justification to spend this effort on
the wrapper. This old code is making it much more difficult to clean up
the driver interface and at this point, the best option seems to be to
remove the driver wrappers. Should someone really still need this, the
old code will continue to be available in hostapd 0.6.x.

14 years agodriver_wired: Move STA entry processing away from driver wrapper
Jouni Malinen [Sat, 12 Dec 2009 18:39:25 +0000 (20:39 +0200)]
driver_wired: Move STA entry processing away from driver wrapper

Get rid of hostapd/sta_info.h dependency by introducing a new driver
callback function for hostapd.

14 years agoWPS: Handle Selected Registrar as a union of info from all Registrars
Jouni Malinen [Sat, 12 Dec 2009 14:54:59 +0000 (16:54 +0200)]
WPS: Handle Selected Registrar as a union of info from all Registrars

Instead of using the latest selected registrar change, collect selected
registrar information separately from all registrars and use the union
of this information when building the WPS IE for Beacon and Probe
Response frames.

Note: SetSelectedRegistrar UPnP action does not include a unique
identifier, so the ER matching routine is based only on the IP address
of the ER. In theory, there could be multiple ERs using the same IP
address (but different port or URL), so there may be some corner cases
that would not always match the correct ER entry at the AP. Anyway, this
is not really expected to occur in normal use cases and even if it did
happen, the selected registrar information is not any worse than it was
before when only the last change from any registrar for being
advertized.

14 years agoWPS: Add display and keypad config methods for WPS ER
Jouni Malinen [Sat, 12 Dec 2009 14:49:33 +0000 (16:49 +0200)]
WPS: Add display and keypad config methods for WPS ER

14 years agoWPS: Move POST URL validation into web_connection_parse_post()
Jouni Malinen [Sat, 12 Dec 2009 14:48:50 +0000 (16:48 +0200)]
WPS: Move POST URL validation into web_connection_parse_post()

This is more logical location for checking the URL and potentially
handling a call to another URL handler. In addition, return 404 error,
not invalid UPnP action, if the URL does not match.

14 years agoWPS: Remove an obsolete comment about UPnP actions and callbacks
Jouni Malinen [Sat, 12 Dec 2009 14:48:18 +0000 (16:48 +0200)]
WPS: Remove an obsolete comment about UPnP actions and callbacks

14 years agoWPS: Remove unnecessary GetDevice and PutMessage callbacks
Jouni Malinen [Sat, 12 Dec 2009 14:47:39 +0000 (16:47 +0200)]
WPS: Remove unnecessary GetDevice and PutMessage callbacks

These callbacks can be handled internally within core WPS code, so there
is no need to go through wps_hostapd.c with a callback function that is
just calling back into the core WPS code.