Commit graph

1097 commits

Author SHA1 Message Date
Jouni Malinen 7f5957abcf eloop: Fix crash on signal handler cancelling next timeout
It is possible that the timeout pointer becomes invalid in one of the
signal handlers, so we need to reload the pointer after those.
2010-05-28 22:18:28 +03:00
Jouni Malinen 8b0ea5a07e atheros: Fix WPA/802.1X disabling to clear Privacy flag
Setting IEEE80211_PARAM_AUTHMODE to IEEE80211_AUTH_AUTO ends up enabling
Privacy mode in the driver. We need to clear that to allow hostapd to be
reconfigured into open mode.
2010-05-28 21:51:31 +03:00
Jouni Malinen 7d6640a62c WPS ER: Add command for configuring an AP
wps_er_config can now be used to configure an AP. It is similar to
wps_er_learn, but instead of only learning the current AP settings,
it continues to send M8 with the new settings for the AP.
2010-05-28 00:01:48 +03:00
Jouni Malinen 15dbf1291a WPS ER: Add ctrl_iface event for learned AP settings 2010-05-27 15:24:45 +03:00
Jouni Malinen 0848668513 WPS ER: Allow AP filtering based on IP address
wps_er_start command now takes an optional parameter that can be used
to configure a filter to only allow UPnP SSDP messages from the
specified IP address. In practice, this limits the WPS ER operations
to a single AP and filters out all other devices in the network.
2010-05-27 15:23:55 +03:00
Jouni Malinen 826fe5fec3 WPS ER: Fix Credential to use correct Enrollee MAC Address
When starting the protocol run with an Enrollee, clone the AP Settings
and replace the AP MAC Address with the Enrollee MAC Address so that the
correct value is then used in the Credential attribute in M8.
2010-05-27 15:22:44 +03:00
Jouni Malinen ed7a09f914 Add WPS IE into (Re)Association Response frame if WPS is used
If the associating station indicates that it is intents to use WPS
by including WPS IE in (Re)Association Request frame, include WPS IE
in (Re)Association Response frame.
2010-05-26 18:46:08 +03:00
Jouni Malinen 16e46ec043 Reassemble WPS IE(s) in (Re)Association Request if needed
Use a function that will take care of possible (though, very unlikely)
fragmentation of WPS TLVs in (Re)Association Request frames.
2010-05-26 18:17:13 +03:00
Jouni Malinen 99e437ad52 Fix WPS attribute parser to use correct pointer for Response Type 2010-05-26 17:12:30 +03:00
Jouni Malinen 32b752ef8f Internal TLS: Fix X.509 name handling to use sequency of attributes
There may be more than one attribute of same type (e.g., multiple DC
attributes), so the code needs to be able to handle that. Replace the
fixed structure with an array of attributes.
2010-05-25 20:55:29 +03:00
Jouni Malinen 969b403fa7 Internal TLS: Add domainComponent parser for X.509 names 2010-05-25 19:43:21 +03:00
Jouni Malinen 5216938960 Fix memory leak on rfkill init error path 2010-05-25 12:06:25 +03:00
Jouni Malinen 8c0ef18199 Fix a typo in unused attribute name 2010-05-25 09:57:22 +03:00
Masashi Honma 6db1602d5b bsd: Use set_freq() API for AP mode wpa_supplicant
Previous version driver_bsd.c switches the channel in
wpa_driver_bsd_associate(). This patch changes it to use set_freq().
I have tested this patch on FreeBSD 8.0/NetBSD 5.0.2 with hostapd,
wpa_supplicant(AP) and wpa_supplicant(STA).
2010-05-23 12:20:33 +03:00
Jouni Malinen 8401a6b028 Add Linux rfkill support
Add a new wpa_supplicant state: interface disabled. This can be used
to allow wpa_supplicant to be running with the network interface even
when the driver does not actually allow any radio operations (e.g.,
due to rfkill).

Allow driver_nl80211.c and driver_wext.c to start while rfkill is in
blocked state (i.e., when ifconfig up fails) and process rfkill
events to block/unblock WLAN.
2010-05-23 10:27:32 +03:00
Andriy Tkachuk 6deb41e73f Update WPS IE on hostapd reconfiguration
This is needed to handle cases where WPS state may have changed and
hostapd is reloading its configuration.
2010-05-02 11:21:19 +03:00
Jouni Malinen 1bc774a12a hostapd: Reorder some IEs to get closer to IEEE 802.11 standard
Vendor-specific IEs are supposed to be in the end of the frame, so move
WMM into the end of Beacon, Probe Response, and (Re)Association Response
frames. In addition, move HT IEs to be later in (Re)Association
Response to match the correct order.

hostapd_eid_wpa() adds multiple IEs and the end result may not always be
correct. If WPA is enabled, WPA IE (vendor-specific) gets added in the
middle of the frame and not in the end. This would require a larger
change to spliut the IEs from WPA module into separate locations when
constructing Beacon and Probe Response frames. This is not yet addressed.
2010-05-02 10:53:01 +03:00
Jouni Malinen b4a1256d36 Fix fallback from failed PMKSA caching into full EAP authentication
Commit 83935317a7 added forced
disconnection in case of 4-way handshake failures. However, it should
not have changed the case where the supplicant is requesting fallback
to full EAP authentication if the PMKID in EAPOL-Key message 1/4 is
not know. This case needs to send an EAPOL-Start frame instead of
EAPOL-Key message 2/4.

This works around a problem with APs that try to force PMKSA caching
even when the client does not include PMKID in (re)association request
frame to request it. [Bug 355]
2010-05-01 17:35:28 +03:00
Jouni Malinen 439d4bf960 Fix EAPOL_SM_USES_WPA flag to be set correctly
Commit c02d52b405 removed direct calls
to the WPA authenticator, but the change here was incorrect.
EAPOL_SM_USES_WPA was supposed to be set based on sta->wpa_sm being
set, i.e., no need to check for PMKSA entries for that.

While this could potentially change EAPOL Key TX state machine behavior,
no clear problems have been identified so far. Anyway, better fix this
to get the correct flags set for EAPOL authenticator state machine.
2010-05-01 17:12:59 +03:00
Jouni Malinen 3ab72b626b Fix WPA state machine initialization on WPA_REAUTH if needed
When using WPS, we may end up here if the STA manages to re-associate
without the previous STA entry getting removed. Consequently, we need to
make sure that the WPA state machines gets initialized properly at this
point.
2010-04-23 16:49:50 +03:00
Jouni Malinen fb2ab5dd6a hostap.git is now 0.8.x development tree
0.7.x for branched into hostap-07.git for stable releases.
2010-04-18 21:01:00 +03:00
Jouni Malinen be48214d2b Preparations for 0.7.2 release 2010-04-18 18:02:34 +03:00
Jouni Malinen e4cbe058d6 TNC: Add more debug infor to EAP-TNC server state changes 2010-04-18 12:24:02 +03:00
Jouni Malinen 11804a4ebc TNC: Fix EAP-TNC fragmentation of the last message
62477841a1 tried to address fragmentation
issues, but it did not address the case where the final EAP-TNC
message gets fragmented. Move the state update to the correct place
to address this case, too.
2010-04-18 12:21:56 +03:00
Jouni Malinen 5febb0d272 TNCS: Fix uninit in error case to not double free IMVs 2010-04-18 11:10:46 +03:00
Jouni Malinen e0f412b927 atheros: Restore ATH_WPS_IE definition and comment 2010-04-17 21:47:13 +03:00
Jouni Malinen 9b74812032 atheros: Add more robust and complete debug info for ioctl failures 2010-04-17 21:45:34 +03:00
Jouni Malinen a317d8520e atheros: Update to build with the current driver version 2010-04-17 21:04:26 +03:00
Jouni Malinen 2de5a860a3 Fix build without CONFIG_FULL_DYNAMIC_VLAN 2010-04-17 21:01:35 +03:00
Jouni Malinen 7992b07f6a Remove unnecessary SUBDIRS loops from src/*/Makefile
There are no subdirectories in any of these directories or plans
for adding ones. As such, there is no point in running the loop
that does not do anything and can cause problems with some shells.
2010-04-17 17:10:31 +03:00
Jouni Malinen e34ce1683c VLAN: Reorder init to get same behavior for all VLAN interfaces
Both the wildcard VLAN entry and the statically configured VLAN
interfaces should behave in the same way. Initializing the
full dynamic VLAN code before adding the statically configured VLAN
interfaces allows the same processing to be applied to both statically
and dynamically added VLAN interface (i.e., also the statically
configured ones will be added to a bridge).
2010-04-17 09:48:27 +03:00
Jouni Malinen 0249c988bb VLAN: Set statically configured VLAN interfaces up
This is needed to be able to bind stations to them with mac80211.
2010-04-17 09:45:18 +03:00
Jouni Malinen 37eb8da957 nl80211: Fix wpa_supplicant build 2010-04-16 14:13:27 +03:00
Jouni Malinen b9c3e576cb VLAN: Fix bridge interface clean up for no tagged_interface case 2010-04-16 01:13:46 +03:00
M. Braun 20e2cb0ae0 VLAN: Decrease bridge forwarding delay to avoid EAPOL timeouts 2010-04-16 00:48:32 +03:00
M. Braun 0ab7a701ab nl80211: Fix initial add_ifidx() realloc to not forget values
We need to make a copy of the old entries the first time the
if_indices buffer gets allocated.
2010-04-16 00:39:59 +03:00
M. Braun 97cfcf6482 nl80211: Add bridge interfaces to own ifindex list automatically
Whenever our own interface is added to a bridge, add that bridge
into the list of own interfaces.
2010-04-16 00:36:33 +03:00
M. Braun 37ba0928d5 VLAN: Set dynamic VLAN up to fix STA bind and key setup 2010-04-15 23:54:41 +03:00
Jouni Malinen cd1d72c1d0 nl80211: Add more debug info on NL80211_ATTR_STA_VLAN failures 2010-04-15 23:46:49 +03:00
Jouni Malinen 4254100d6c Stop processing if STA VLAN bind fails 2010-04-15 23:44:10 +03:00
Jouni Malinen 91faf6b948 VLAN: Clean up debug code and error messages 2010-04-15 20:35:51 +03:00
Jouni Malinen c47cf42e4b WPS: Fix association when both WPS and WPA/RSN IE are included
The WPS IE was overriding the WPA/RSN IE in driver based MLME case
(hostapd_notif_assoc), but the MLME code here was not using WPS IE
correctly, i.e., it allowed the WPA/RSN IE override the operation.
2010-04-15 12:55:34 +03:00
Jouni Malinen 843123590a Fix hostapd build without WPS 2010-04-12 15:15:17 +03:00
Jouni Malinen 0cb445a472 Fix internal DH implementation not to pad shared key
The returned buffer length was hardcoded to be the prime length
which resulted in shorter results being padded in the end. However,
the results from DH code are supposed to be unpadded (and when used
with WPS, the padding is done in WPS code and it is added to the
beginning of the buffer). This fixes WPS key derivation errors
in about 1/256 of runs ("WPS: Incorrect Authenticator") when using
the internal crypto code.
2010-04-12 12:25:21 +03:00
Jouni Malinen 0544b24248 Add BSSID and reason code (if available) to disconnect event
This adds more details into the CTRL-EVENT-DISCONNECTED event to
make it easier to figure out which network was disconnected in some
race conditions and to what could have been the reason for
disconnection. The reason code is currently only available with
the nl80211 driver wrapper.
2010-04-11 21:25:15 +03:00
Jouni Malinen e3802622db nl80211: Define set_freq for wpa_supplicant, too 2010-04-11 20:36:16 +03:00
Jouni Malinen c706d5aa17 Add wpa_supplicant AP mode events for Public Action frames 2010-04-11 20:33:33 +03:00
Jouni Malinen 195420b8d1 Add WPS Registrar success callback 2010-04-11 20:21:08 +03:00
Jouni Malinen b3db190fa2 Started to make set_ap_wps_ie() capable of adding multiple IEs
This mechanism can be used to add various IEs to Beacon and Probe
Response frames and it should be made clear that it is not reserved
only for WPS IE.
2010-04-11 20:16:43 +03:00
Jouni Malinen 087f0254d7 FT: Fix wpa_sm_set_ft_params wrapper for non-FT build 2010-04-11 19:49:32 +03:00