libeap.git
15 years agonl80211 hostapd driver: clean up netlink code
Johannes Berg [Mon, 29 Sep 2008 16:37:24 +0000 (19:37 +0300)]
nl80211 hostapd driver: clean up netlink code

Put it into a single place instead of having it all over.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
15 years agonl80211 driver: correctly set the encrypt bit for eapol frames
Johannes Berg [Mon, 29 Sep 2008 16:21:51 +0000 (19:21 +0300)]
nl80211 driver: correctly set the encrypt bit for eapol frames

A recent kernel change led to all EAPOL frames being encrypted rather than
just those for the group handshake. This is due to transmit processing in
the kernel now using the proper interface which would encrypt those frames
with the group key because hostapd wasn't requesting that they not be
encrypted. This changes the nl80211 driver to not request encryption unless
the EAPOL frame should be encrypted.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
15 years agoFT: Do not call wpa_ft_prepare_auth_request() if FT is not used
Jouni Malinen [Mon, 29 Sep 2008 14:28:10 +0000 (17:28 +0300)]
FT: Do not call wpa_ft_prepare_auth_request() if FT is not used

This saves some extra processing for the non-FT case if FT is built in, but
not used for the association.

15 years agoAdded set_mode() handler for privsep
Jouni Malinen [Mon, 29 Sep 2008 14:09:26 +0000 (17:09 +0300)]
Added set_mode() handler for privsep

15 years agoFixed build without CONFIG_CLIENT_MLME
Jouni Malinen [Mon, 29 Sep 2008 13:59:51 +0000 (16:59 +0300)]
Fixed build without CONFIG_CLIENT_MLME

15 years agoAdd an optional set_mode() driver_ops handler for setting mode before keys
Dan Williams [Mon, 29 Sep 2008 13:45:49 +0000 (16:45 +0300)]
Add an optional set_mode() driver_ops handler for setting mode before keys

A bug just got reported as a result of this for mac80211 drivers.

https://bugzilla.redhat.com/show_bug.cgi?id=459399

The basic problem is that since taking the device down clears the keys
from the driver on many mac80211-based cards, and since the mode gets
set _after_ the keys have been set in the driver, the keys get cleared
on a mode switch and the resulting association is wrong.  The report is
about ad-hoc mode specifically, but this could happen when switching
from adhoc back to managed mode.

15 years agoUpdate the OpenSSL EAP-FAST patch for current snapshot (20080928)
Jouni Malinen [Sun, 28 Sep 2008 15:06:12 +0000 (18:06 +0300)]
Update the OpenSSL EAP-FAST patch for current snapshot (20080928)

This reverts the addition of ssl3_digest_cached_records() call from the
previous update (3d1aa251a3783305fe31b280bb570ce9153bd982) since OpenSSL
has apparently reverted some earlier changes that broke EAP-FAST.

15 years agoAdded OpenSSL 0.9.8i patch for EAP-FAST
Jouni Malinen [Sun, 28 Sep 2008 14:09:22 +0000 (17:09 +0300)]
Added OpenSSL 0.9.8i patch for EAP-FAST

15 years agoValidate WEXT event iwe->u.data.length before using the event data
Jouni Malinen [Sat, 27 Sep 2008 07:49:56 +0000 (10:49 +0300)]
Validate WEXT event iwe->u.data.length before using the event data

This is needed to avoid crashing wpa_supplicant with invalid event messages
that may be received when using 64-bit kernel with 32-bit userspace.

15 years agoSilenced compiler warnings on size_t printf format and shadowed variables
Jouni Malinen [Sat, 27 Sep 2008 07:46:06 +0000 (10:46 +0300)]
Silenced compiler warnings on size_t printf format and shadowed variables

15 years agoSplit wpa_supplicant_select_bss() into three and remove odd debug message
Jouni Malinen [Fri, 26 Sep 2008 14:24:40 +0000 (17:24 +0300)]
Split wpa_supplicant_select_bss() into three and remove odd debug message

This function was getting way too long, so let's split it into WPA and
non-WPA cases as separate functions. In addition, remove the confusing
"Try to find non-WPA AP" debug message if a WPA-enabled AP is already
selected (as reported by Andriy Tkachuk).

15 years agoDon't bother showing a status message when returning to the system tray,
Kel Modderman [Fri, 26 Sep 2008 12:42:12 +0000 (15:42 +0300)]
Don't bother showing a status message when returning to the system tray,
but still show a one time tray message to indicate to the user that the
program is still running in the tray if they triggered the window manager
close button.

Signed-off-by: Kel Modderman <kel@otaku42.de>
15 years agowpa_gui-qt4: remove lastWindowClosed() signal handler
Kel Modderman [Thu, 25 Sep 2008 18:12:08 +0000 (21:12 +0300)]
wpa_gui-qt4: remove lastWindowClosed() signal handler

Do not connect lastWindowClosed() to quit(), instead explicitly close the
application if File->Exit or window manager close button is activated.
This allows the tray app to avoid being closed with last visible window,
and launch scan and event history windows individually.

Signed-off-by: Kel Modderman <kel@otaku42.de>
15 years agowpa_gui-qt4: enhance svg icon
Bernard Gray [Thu, 25 Sep 2008 18:09:44 +0000 (21:09 +0300)]
wpa_gui-qt4: enhance svg icon

Enhance the wpa_gui-qt4 icon:

* removed unused layer
* moved spurious rectangle back where it belongs
* removed flat edge from top of the lower white glow object

Signed-off-by: Bernard Gray <bernard.gray@gmail.com>
15 years agowpa_gui-qt4: add status fields to tray message
Kel Modderman [Thu, 25 Sep 2008 18:06:32 +0000 (21:06 +0300)]
wpa_gui-qt4: add status fields to tray message

Add extra state status fields to the tray icon message bubble. Do not
display an empty message.

Signed-off-by: Kel Modderman <kel@otaku42.de>
15 years agoFix build with CONFIG_CLIENT_MLME, but without CONFIG_IEEE80211W
Andriy Tkachuk [Wed, 24 Sep 2008 10:02:17 +0000 (13:02 +0300)]
Fix build with CONFIG_CLIENT_MLME, but without CONFIG_IEEE80211W

mlme.c: In function 'ieee80211_rx_mgmt_action':
mlme.c:1990: warning: implicit declaration of function
'ieee80211_rx_mgmt_ping_action'
...
mlme.o(.text+0x3007): In function `ieee80211_sta_rx':
/home/ant/hostap/hostap06/hostap/wpa_supplicant/mlme.c:1990: undefined reference
to `ieee80211_rx_mgmt_ping_action'
collect2: ld returned 1 exit status

15 years agoDon't post scan results when initial scan is emtpy
Dan Nicholson [Wed, 24 Sep 2008 09:51:08 +0000 (12:51 +0300)]
Don't post scan results when initial scan is emtpy

When the initial scan is made, just the cached results from the driver
are used. If this is empty, it's useless to post the results since
another scan is being scheduled immediately. This just causes extra
processing from listeners for no gain.

15 years agoRestore scan request settings if initial association failed
Dan Nicholson [Wed, 24 Sep 2008 09:48:33 +0000 (12:48 +0300)]
Restore scan request settings if initial association failed

The scan path to initiate another scan if the initial association failed
was broken due to wpa_s->scan_req being zeroed earlier in
wpa_supplicant_scan(). This caused the second scan to bail out early
since it thought this was not a requested scan.

15 years agoAdd a new auto-generated file to be ignored
Jouni Malinen [Wed, 24 Sep 2008 09:29:04 +0000 (12:29 +0300)]
Add a new auto-generated file to be ignored

15 years agowpa_gui-qt4: add system tray support
Kel Modderman [Wed, 24 Sep 2008 09:26:57 +0000 (12:26 +0300)]
wpa_gui-qt4: add system tray support

Add system tray icon support to wpa_gui-qt4. The tray icon remains quiet
when the main dialog is visible, so it should not cause too much pain for
more conservative users of wpa_gui. The addition involves the following
changes:

* when closing wpa_gui via window manager close box, wpa_gui close event is
  ignored and it is minimised to system tray. A status message is displayed
  (or popup dialog box if tray messages are not supported) to provide a
  visual hint that the program is still running in the background.
* add File->Exit slot handler to facilitate application quit from main
  dialog
* provide a context menu with a short list of useful actions
* show/hide main dialog when icon is triggered (single click)
* ensure main dialog is visible when event handler or scan results is
  chosen from tray icon context menu
* show tray messages on connected and disconnected events, display a status
  message a few seconds after connected events

Signed-off-by: Kel Modderman <kel@otaku42.de>
15 years agowpa_gui-qt4: remove qPixmapFromMimeSource from ui files
Kel Modderman [Wed, 24 Sep 2008 09:24:49 +0000 (12:24 +0300)]
wpa_gui-qt4: remove qPixmapFromMimeSource from ui files

When integrating the new art, this UI entry:

<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>

Caused the following error:

.obj/wpagui.o: In function `Ui_WpaGui::setupUi(QMainWindow*)':
wpagui.cpp:(.text._ZN9Ui_WpaGui7setupUiEP11QMainWindow[Ui_WpaGui::setupUi(QMainWindow*)]+0xd3): undefined reference to `qPixmapFromMimeSource(QString const&)'
collect2: ld returned 1 exit status

Removing qPixmapFromMimeSource seems to have no unwanted side effects, and
allows successful build again. Research leads me to believe it depends on
Qt3Support, which we do not want.

Signed-off-by: Kel Modderman <kel@otaku42.de>
15 years agowpa_gui-qt4: use new svg as application icon
Kel Modderman [Wed, 24 Sep 2008 09:22:50 +0000 (12:22 +0300)]
wpa_gui-qt4: use new svg as application icon

Enhance wpa_gui's appearance by integrating the new svg icon via a resource
file.

Signed-off-by: Kel Modderman <kel@otaku42.de>
15 years agowpa_gui-qt4: desktop entry file
Kel Modderman [Wed, 24 Sep 2008 09:20:58 +0000 (12:20 +0300)]
wpa_gui-qt4: desktop entry file

A desktop entry file for wpa_gui.

Signed-off-by: Kel Modderman <kel@otaku42.de>
15 years agowpa_gui-qt4: add svg icon
Bernard Gray [Wed, 24 Sep 2008 09:19:31 +0000 (12:19 +0300)]
wpa_gui-qt4: add svg icon

Introducing an original wpa_gui icon, in svg format, with Makefile for
easy conversion to other icon formats. The icon is thanks to Bernard Gray.

Signed-off-by: Bernard Gray <bernard.gray@gmail.com>
Signed-off-by: Kel Modderman <kel@otaku42.de>
15 years agoFixed eap_example build to match with EAP-PEAP changes
Jouni Malinen [Wed, 24 Sep 2008 05:46:05 +0000 (08:46 +0300)]
Fixed eap_example build to match with EAP-PEAP changes

15 years agoIEEE 802.11w: Use comeback duration to delay association
Jouni Malinen [Mon, 1 Sep 2008 08:48:43 +0000 (11:48 +0300)]
IEEE 802.11w: Use comeback duration to delay association

15 years agoFT: Fixed FTIE for authentication after a failed association
Jouni Malinen [Mon, 1 Sep 2008 08:38:13 +0000 (11:38 +0300)]
FT: Fixed FTIE for authentication after a failed association

15 years agoMFP + FT: Added support for sending IGTK in FTIE
Jouni Malinen [Mon, 1 Sep 2008 08:00:59 +0000 (11:00 +0300)]
MFP + FT: Added support for sending IGTK in FTIE

15 years agoAdded support for using SHA256-based stronger key derivation for WPA2
Jouni Malinen [Sun, 31 Aug 2008 19:57:28 +0000 (22:57 +0300)]
Added support for using SHA256-based stronger key derivation for WPA2

IEEE 802.11w/D6.0 defines new AKMPs to indicate SHA256-based algorithms for
key derivation (and AES-CMAC for EAPOL-Key MIC). Add support for using new
AKMPs and clean up AKMP processing with helper functions in defs.h.

15 years agoCleaned up TX callback request processing
Jouni Malinen [Sun, 31 Aug 2008 08:15:56 +0000 (11:15 +0300)]
Cleaned up TX callback request processing

Move the use of 802.11 header protocol field into driver_hostap.c since
this is a Host AP driver specific mechanism and other driver wrappers
should not really need to know about it.

15 years agoMoved WMM action category definition into ieee802_11_defs.h
Jouni Malinen [Sun, 31 Aug 2008 08:06:58 +0000 (11:06 +0300)]
Moved WMM action category definition into ieee802_11_defs.h

15 years agoIEEE 802.11w: Added association ping
Jouni Malinen [Sun, 31 Aug 2008 08:04:47 +0000 (11:04 +0300)]
IEEE 802.11w: Added association ping

This updates management frame protection to use the assocition ping process
from the latest draft (D6.0) to protect against unauthenticated
authenticate or (re)associate frames dropping association.

15 years agoCopy previous BSSID into STA data only after full validation of the request
Jouni Malinen [Sat, 30 Aug 2008 15:25:44 +0000 (18:25 +0300)]
Copy previous BSSID into STA data only after full validation of the request

15 years agoUpdated MFP defines based on IEEE 802.11w/D6.0 and use new MFPC/MFPR
Jouni Malinen [Sat, 30 Aug 2008 11:59:39 +0000 (14:59 +0300)]
Updated MFP defines based on IEEE 802.11w/D6.0 and use new MFPC/MFPR

This adds most of the new frame format and identifier definitions from IEEE
802.11w/D6.0. In addition, the RSN IE capability field values for MFP is
replaced with the new two-bit version with MFPC (capable) and MFPR
(required) processing.

15 years agoAdded a place for example mac80211_hwsim test cases
Jouni Malinen [Thu, 28 Aug 2008 15:53:47 +0000 (18:53 +0300)]
Added a place for example mac80211_hwsim test cases

The tests directory and its subdirectories contain a set of configuration
files that can be used to exercise various mac80211, hostapd, and
wpa_supplicant features. The test.txt file in each test directory describes
the particular test and includes the commands needed to run the test.

15 years agoAdded support for setting VLAN ID for STAs based on local MAC ACL
Jouni Malinen [Thu, 28 Aug 2008 15:43:26 +0000 (18:43 +0300)]
Added support for setting VLAN ID for STAs based on local MAC ACL

This allows the accept_mac_file to be used as an alternative for RADIUS
server-based configuration. This is mainly to ease VLAN testing (i.e., no
need to set up RADIUS server for this anymore).

15 years agoFixed WEXT scan result parser to not crash on invalid IEs (zero len buffer)
Jouni Malinen [Wed, 27 Aug 2008 06:52:16 +0000 (09:52 +0300)]
Fixed WEXT scan result parser to not crash on invalid IEs (zero len buffer)

If IWEVGENIE or custom event wpa_ie/rsn_ie is received in scan with empty
buffer, the previous version ended up calling realloc(NULL, 0) which seems
to return a non-NULL value in some cases. When this return value is passed
again into realloc with realloc(ptr, 0), the returned value could be NULL.
If the ptr is then freed (os_free(data.ie) in SIOCGIWAP handling), glibc
may crash due to invalid pointer being freed (or double-freed?). The
non-NULL realloc(NULL, 0) return value from glibc looks a bit odd behavior,
but anyway, better avoid this case completely and just skip the IE events
that have an empty buffer.

This issue should not show up with drivers that produce proper scan results
since the IEs will always include the two-octet header. However, it seems
to be possible to see this when using 64-bit kernel and 32-bit userspace
with incorrect compat-ioctl processing.

15 years agoSend HT parameters for new STAs
Jouni Malinen [Mon, 25 Aug 2008 08:30:39 +0000 (11:30 +0300)]
Send HT parameters for new STAs

This depends on a mac80211 patch to add NL80211_ATTR_HT_CAPABILITY
(which is not yet in wireless-testing).

15 years agoSwitched driver_nl80211 to use the new sta_add2()
Jouni Malinen [Mon, 25 Aug 2008 07:06:40 +0000 (10:06 +0300)]
Switched driver_nl80211 to use the new sta_add2()

15 years agoUpdated the OpenSSL EAP-FAST patch for the current OpenSSL 0.9.9 snapshot
Jouni Malinen [Sun, 24 Aug 2008 10:12:54 +0000 (13:12 +0300)]
Updated the OpenSSL EAP-FAST patch for the current OpenSSL 0.9.9 snapshot

sssleay.num had changed (new function allocated) and server code was
modified to call ssl3_digest_cached_records() in the start of abbreviated
handshake to avoid possible segmentation faults later in some cases when
reverting to full handshake. In addition, there is some whitespace cleanup
and added comment explaining TLS ticket processing.

15 years agoFixed internal TLSv1 server implementation for abbreviated handshake
Jouni Malinen [Sun, 24 Aug 2008 10:08:15 +0000 (13:08 +0300)]
Fixed internal TLSv1 server implementation for abbreviated handshake

When the TLS handshake had been completed earlier by the server in case of
abbreviated handshake, the output buffer length was left uninitialized. It
must be initialized to zero in this case. This code is used by EAP-FAST
server and the uninitialized length could have caused it to try to send a
very large frame (though, this would be terminated by the 50 roundtrip EAP
limit). This broke EAP-FAST server code in some cases when PAC was used to
establish the tunnel.

15 years agoFixed EAP-FAST server PAC-Opaque padding
Jouni Malinen [Sun, 24 Aug 2008 09:50:12 +0000 (12:50 +0300)]
Fixed EAP-FAST server PAC-Opaque padding

0.6.4 broke this for some peer identity lengths. The padding was supposed
to make sure that the length of PAC-Opaque is divisible by 8.

15 years agoHT: Removed unused definitions
Jouni Malinen [Fri, 22 Aug 2008 18:07:07 +0000 (21:07 +0300)]
HT: Removed unused definitions

15 years agoMoved IEEE 802.11n parameter to be per-radio instead of per-BSS
Jouni Malinen [Fri, 22 Aug 2008 18:03:31 +0000 (21:03 +0300)]
Moved IEEE 802.11n parameter to be per-radio instead of per-BSS

15 years agoDo not store dynamic HT IEs in configuration structures
Jouni Malinen [Fri, 22 Aug 2008 17:55:52 +0000 (20:55 +0300)]
Do not store dynamic HT IEs in configuration structures

The configuration data should only store the static configuration data and
not dynamic data. In addition, storing HT configuration and state in IEs is
not the easiest way of doing this, so use more convenient data types for
storing configuration and dynamic state. The HT IEs are then generated
based on the static configuration and dynamic state whenever needed.

15 years agoAdd Intel copyright for files with 802.11n Intel changes
Tomas Winkler [Fri, 22 Aug 2008 06:15:05 +0000 (09:15 +0300)]
Add Intel copyright for files with 802.11n Intel changes

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
15 years agoAdd configuration option for enabling optional use of short preamble
Jouni Malinen [Thu, 21 Aug 2008 15:36:21 +0000 (18:36 +0300)]
Add configuration option for enabling optional use of short preamble

15 years agoAdd preliminary IEEE 802.11n support into hostapd
Jouni Malinen [Thu, 21 Aug 2008 15:18:38 +0000 (18:18 +0300)]
Add preliminary IEEE 802.11n support into hostapd

This commit brings in cleaned up version of IEEE 802.11n implementation
from Intel (1). The Intel tarball includes number of other changes, too,
and only the changes specific to IEEE 802.11n are brought in here. In
addition, this does not include all the changes (e.g., some of the
configuration parameters are still missing and driver wrapper changes for
mac80211 were not included).

(1)
http://www.kernel.org/pub/linux/kernel/people/chuyee/wireless/iwl4965_ap/hostap_0_6_0_intel_0.0.13.1.tgz

15 years agoAdded mlme_{add,remove}_sta() for userspace MLME
Jouni Malinen [Mon, 18 Aug 2008 19:01:04 +0000 (22:01 +0300)]
Added mlme_{add,remove}_sta() for userspace MLME

These functions are based on the hostapd implementation and complete
the userspace MLME code in wpa_supplicant (though, mac80211 will still need
couple of pending patches to be integrated in order to get userspace client
MLME working again).

15 years agoInternal X.509/TLSv1: Support SHA-256 in X.509 certificate digest
Jouni Malinen [Sat, 16 Aug 2008 08:21:22 +0000 (11:21 +0300)]
Internal X.509/TLSv1: Support SHA-256 in X.509 certificate digest

15 years agoUpdated EAP-TTLSv0 references to use RFC 5281
Jouni Malinen [Sat, 16 Aug 2008 07:17:22 +0000 (10:17 +0300)]
Updated EAP-TTLSv0 references to use RFC 5281

15 years agonl80211: Preliminary code for usermode MLME support
Jouni Malinen [Fri, 15 Aug 2008 19:14:49 +0000 (22:14 +0300)]
nl80211: Preliminary code for usermode MLME support

This adds some parts needed to use usermode MLME with the current mac80211
(plus a patch to add a new cfg80211 command; not yet submitted to
wireless-testing). This version creates a monitor interface for management
frames and is able to send Probe Request frames during scan. However, it
looks like management frame reception is not yet working properly. In
addition, mlme_{add,remove}_sta() handlers are still missing.

15 years agoFixed supported rates IE generation for Probe Response frames.
Jouni Malinen [Fri, 15 Aug 2008 19:10:41 +0000 (22:10 +0300)]
Fixed supported rates IE generation for Probe Response frames.

15 years agonl80211: Fixed re-initialization of removed and re-inserted interface
Jouni Malinen [Fri, 15 Aug 2008 14:55:16 +0000 (17:55 +0300)]
nl80211: Fixed re-initialization of removed and re-inserted interface

Network device ifindex will change when the interface is re-inserted.
driver_nl80211.c will need to accept netlink events from "unknown" (based
on ifindex) interfaces when a previously used card was removed earlier. If
the previously removed interface is added back, the driver_wext data need
to be updated to match with the new ifindex value. In addition, the initial
setup tasks for the card (set interface up, update ifindex, set mode, etc.)
from wpa_driver_nl80211_init() need to be run again.

This is the changes from commit 3fbda8f943fff3e8afd649663bdcbba9cbfd6ee3
(driver_wext.c) ported for driver_nl80211.c.

15 years agonl80211: Fixed set_mode() to actually use adhoc/station nl80211 variables
Jouni Malinen [Fri, 15 Aug 2008 14:52:37 +0000 (17:52 +0300)]
nl80211: Fixed set_mode() to actually use adhoc/station nl80211 variables

15 years agoIEEE Std 802.11r-2008 has been released, so update references
Jouni Malinen [Fri, 15 Aug 2008 08:25:24 +0000 (11:25 +0300)]
IEEE Std 802.11r-2008 has been released, so update references

15 years agoPreparations for 0.6.4 release hostap_0_6_4
Jouni Malinen [Sun, 10 Aug 2008 17:33:12 +0000 (20:33 +0300)]
Preparations for 0.6.4 release

15 years agoFixed MinGW build without CONFIG_NDIS_EVENTS_INTEGRATED defined
Jouni Malinen [Sun, 10 Aug 2008 15:11:41 +0000 (18:11 +0300)]
Fixed MinGW build without CONFIG_NDIS_EVENTS_INTEGRATED defined

15 years agoRenamed MSG to PROC_MSG to avoid conflicts with MinGW winuser.h
Jouni Malinen [Sun, 10 Aug 2008 15:00:11 +0000 (18:00 +0300)]
Renamed MSG to PROC_MSG to avoid conflicts with MinGW winuser.h

15 years agoFixed a NULL pointer dereference when driver initialization fails
Jouni Malinen [Fri, 8 Aug 2008 16:30:58 +0000 (19:30 +0300)]
Fixed a NULL pointer dereference when driver initialization fails

15 years agoAdded support for setting BSS parameters with NL80211_CMD_SET_BSS
Jouni Malinen [Thu, 7 Aug 2008 17:09:55 +0000 (20:09 +0300)]
Added support for setting BSS parameters with NL80211_CMD_SET_BSS

This new cfg80211 command is used for setting CTS protect, short preamble,
and short slot time parameters for the BSS. The matching kernel change has
been submitted, but is not yet included in wireless-testing. The code here
used #ifdef to avoid compilation failures before the new command is
available.

15 years agoAdded support for opportunistic key caching (OKC)
Jouni Malinen [Sun, 3 Aug 2008 17:17:58 +0000 (20:17 +0300)]
Added support for opportunistic key caching (OKC)

This allows hostapd to share the PMKSA caches internally when multiple
BSSes or radios are being controlled by the same hostapd process.

15 years agoFixed opportunistic key caching (OKC)
Jouni Malinen [Sun, 3 Aug 2008 17:16:59 +0000 (20:16 +0300)]
Fixed opportunistic key caching (OKC)

wpa_sm_set_config() can be called even if the network block does not
change. However, the previous version ended up calling
pmksa_cache_notify_reconfig() every time and this cleared the network
context from PMKSA cache entries. This prevented OKC from ever being used.

Do not call pmksa_cache_notify_reconfig() if the network context remains
unchanged to allow OKC to be used.

15 years agoWEXT: Fixed re-initialization of removed and re-inserted interface
Jouni Malinen [Thu, 24 Jul 2008 22:30:53 +0000 (01:30 +0300)]
WEXT: Fixed re-initialization of removed and re-inserted interface

Network device ifindex will change when the interface is re-inserted.
driver_wext.c will need to accept netlink events from "unknown" (based on
ifindex) interfaces when a previously used card was removed earlier. If the
previously removed interface is added back, the driver_wext data need to be
updated to match with the new ifindex value. In addition, the initial setup
tasks for the card (set interface up, update ifindex, set mode, etc.) from
wpa_driver_wext_init() need to be run again.

15 years agoCleaned up some of invalid documentation related to channel configuration.
Jouni Malinen [Wed, 23 Jul 2008 00:51:10 +0000 (03:51 +0300)]
Cleaned up some of invalid documentation related to channel configuration.

15 years agoFixed NULL pointer dereference on error path [Bug 273]
Jouni Malinen [Fri, 18 Jul 2008 02:57:03 +0000 (05:57 +0300)]
Fixed NULL pointer dereference on error path [Bug 273]

15 years agoFixed EAP-TNC not to include extra EAP header and TNC flags
Jouni Malinen [Wed, 16 Jul 2008 23:17:37 +0000 (02:17 +0300)]
Fixed EAP-TNC not to include extra EAP header and TNC flags

The change to support fragmentation added extra function to generate the
EAP header, but forgot to remove the original code and ended up getting two
EAP headers and TNC flags field in the generated message. These header
fields need to be added only in the function that builds the final message
(and if necessary, fragments the data).

15 years agowext: fix maxrate calculation
Dan Williams [Tue, 15 Jul 2008 17:07:50 +0000 (20:07 +0300)]
wext: fix maxrate calculation

When scan results got moved from wpa_scan_result -> wpa_scan_res, the
'maxrate' member was dropped from wpa_scan_res.  The D-Bus interface
used 'maxrate', which was replaced with wpa_scan_get_max_rate().
Unfortunately, wpa_scan_get_max_rate() returns 802.11 rate values
directly from the IE, where 'maxrate' was the rate in bits/second.  The
supplicant internally fakes an IE for wpa_scan_res from the value of
wpa_scan_result->maxrate, but interprets ->maxrate as an 802.11 rate
index.

As a side-effect, this fixes a soft-break of the D-Bus control API since
the wpa_scan_res change was introduced.

15 years agoFixed wpa_scan_get_max_rate() to clear the basicrate flag when determining
Jouni Malinen [Tue, 15 Jul 2008 17:05:50 +0000 (20:05 +0300)]
Fixed wpa_scan_get_max_rate() to clear the basicrate flag when determining
the highest rate.

15 years agoMake proactive key caching working again
Michael Bernhard [Sun, 6 Jul 2008 07:50:53 +0000 (10:50 +0300)]
Make proactive key caching working again

Function 'wpa_sm_set_config' used the argument 'config' as the network
context which is a pointer to a local variable of the function
'wpa_supplicant_rsn_supp_set_config'.

This is one reason why no proactive key was generated. This network
context never matched with the network context saved in the pmksa cache
entries.

The structure 'rsn_supp_config' has already a member 'network_ctx' which
is now filled in by this patch with 'ssid'.

Signed-off-by: Michael Bernhard <michael.bernhard@bfh.ch>
15 years agoman wpa_supplicant: Clearly state which options are given per interface
Pavel Polischouk [Wed, 18 Jun 2008 08:52:20 +0000 (11:52 +0300)]
man wpa_supplicant: Clearly state which options are given per interface

Documentation appeared a little vague about which options are global and
which are tied to a particular interface. This leads to confusion when
using certain combinations of options, e.g. the command "wpa_supplicant
-c /etc/wpa_supplican.conf -u" will not do what is intuitively expected
from it - it will not read the config file given with -c option because
no -i option was given. This command is still valid because -u option is
used. The wpa_supplicant running like this will also not listen on any
control socket, because the socket file name is usually given in the
config file. This command line also happens to be the default in Fedora 9.
This patch does not try to change any behaviour, but rather document
these nuances clearly.

15 years agoAdd IGTK/MFP configuration (disabled by default)
Jouni Malinen [Wed, 18 Jun 2008 08:23:59 +0000 (11:23 +0300)]
Add IGTK/MFP configuration (disabled by default)

Added code to use suggested nl80211/cfg80211 API for setting MFP related
parameters. This is disabled by default since the API changes has not yet
been approved. The new commands can be enabled by defining
NL80211_MFP_PENDING (this will be removed once the API changes is
approved).

15 years agoAdded temporary #ifdef WEXT_MFP_PENDING around the MFP changes
Jouni Malinen [Wed, 18 Jun 2008 08:18:26 +0000 (11:18 +0300)]
Added temporary #ifdef WEXT_MFP_PENDING around the MFP changes

Just in case, do not use the not-yet-approved WEXT changes even if someone
where to build wpa_supplicant with IEEE 802.11w support unless this new
macro has been defined explicitly.

15 years agoWEXT: IEEE 802.11w/MFP configuration
Jouni Malinen [Wed, 18 Jun 2008 08:13:33 +0000 (11:13 +0300)]
WEXT: IEEE 802.11w/MFP configuration

Added configuration of MFP related parameters with WEXT. The changes to
linux/wireless.h have not yet been applied to the Linux kernel tree, so the
code using them is still open to changes and is ifdef'ed out if
CONFIG_IEEE80211W is not set.

15 years agoAdd support for the driver which do 4-way handshake
Masakazu Mokuno [Wed, 18 Jun 2008 08:09:00 +0000 (11:09 +0300)]
Add support for the driver which do 4-way handshake

Add the support for the Linux wireless drivers which want to do
4-way handshake and need to know the PSK before the handshake.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
15 years agoAdd the flags for the drivers which do 4-way handshake
Masakazu Mokuno [Wed, 18 Jun 2008 08:03:18 +0000 (11:03 +0300)]
Add the flags for the drivers which do 4-way handshake

Add the new flags which are supposed to be included in Linux 2.6.27
for the drivers which want to do 4-way handshake and to know PMK.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
15 years agoAdded WLAN_STA_MFP flag for driver wrappers so that they can configure the
Jouni Malinen [Tue, 17 Jun 2008 08:21:11 +0000 (11:21 +0300)]
Added WLAN_STA_MFP flag for driver wrappers so that they can configure the
driver to enable MFP (IEEE 802.11w) processing for the STA.

15 years agoAdded support for configuring IGTK
Jouni Malinen [Mon, 16 Jun 2008 08:20:01 +0000 (11:20 +0300)]
Added support for configuring IGTK

This needs changes in kernel code, too, but the cipher suite for IGTK is
defined in IEEE 802.11w, so this code in hostapd side can be added now.

15 years agoRemoved forgotten todo entry
Jouni Malinen [Tue, 10 Jun 2008 17:57:32 +0000 (20:57 +0300)]
Removed forgotten todo entry

15 years agoAdded support for AP mode Beacon transmission
Jouni Malinen [Tue, 10 Jun 2008 17:46:12 +0000 (20:46 +0300)]
Added support for AP mode Beacon transmission

15 years agoSet ACK flag properly for txstatus
Jouni Malinen [Tue, 10 Jun 2008 16:44:26 +0000 (19:44 +0300)]
Set ACK flag properly for txstatus

15 years agoUse _irqsafe versions of ieee80211 rx and tx_status functions
Jouni Malinen [Tue, 10 Jun 2008 16:28:39 +0000 (19:28 +0300)]
Use _irqsafe versions of ieee80211 rx and tx_status functions

15 years agoAdded start/stop handlers and do not send frames to stopped radios
Jouni Malinen [Tue, 10 Jun 2008 16:27:00 +0000 (19:27 +0300)]
Added start/stop handlers and do not send frames to stopped radios

15 years agoAdded a comment about hwsim#
Jouni Malinen [Tue, 10 Jun 2008 15:10:40 +0000 (18:10 +0300)]
Added a comment about hwsim#

15 years agoAdded global monitor interface (hwsim#)
Jouni Malinen [Tue, 10 Jun 2008 14:11:58 +0000 (17:11 +0300)]
Added global monitor interface (hwsim#)

This new netdev is created by hwsim, not mac80211, and as such, it is
available all the time (i.e., can be UP before starting mac80211 netdevs)
and it will receive all frames regardless of the channel etc.

15 years agoFixed tx() handler to use GFP_ATOMIC.
Jouni Malinen [Tue, 10 Jun 2008 12:49:06 +0000 (15:49 +0300)]
Fixed tx() handler to use GFP_ATOMIC.

15 years agoAdded mac80211_hwsim - software simulator of 802.11 radio(s) for mac80211
Jouni Malinen [Tue, 10 Jun 2008 10:31:25 +0000 (13:31 +0300)]
Added mac80211_hwsim - software simulator of 802.11 radio(s) for mac80211

mac80211_hwsim is a Linux kernel module that can be used to simulate
arbitrary number of IEEE 802.11 radios for mac80211 on a single
device. It can be used to test most of the mac80211 functionality and
user space tools (e.g., hostapd and wpa_supplicant) in a way that
matches very closely with the normal case of using real WLAN
hardware. From the mac80211 view point, mac80211_hwsim is yet another
hardware driver, i.e., no changes to mac80211 are needed to use this
testing tool.

15 years agoFixed race condition between disassociation event and group key handshake
Jouni Malinen [Mon, 9 Jun 2008 13:26:47 +0000 (16:26 +0300)]
Fixed race condition between disassociation event and group key handshake

This avoids getting stuck in state where wpa_supplicant has canceled scans,
but the driver is actually in disassociated state. The previously used code
that controlled scan timeout from WPA module is not really needed anymore
(and has not been needed for past four years since authentication timeout
was separated from scan request timeout), so this can simply be removed to
resolved the race condition. As an extra bonus, this simplifies the
interface to WPA module.
[Bug 261]

15 years agoEAP-PEAP: Moved the common peap_prfplus() function into a shared file
Jouni Malinen [Mon, 9 Jun 2008 07:32:12 +0000 (10:32 +0300)]
EAP-PEAP: Moved the common peap_prfplus() function into a shared file

15 years agoAdded a preliminary nl80211/cfg80211 driver interface for wpa_supplicant
Jouni Malinen [Fri, 6 Jun 2008 13:55:42 +0000 (16:55 +0300)]
Added a preliminary nl80211/cfg80211 driver interface for wpa_supplicant

driver_nl80211.c is based on driver_wext.c and it is still using Linux
wireless extensions for many functions. Over time, the new driver interface
code should be modified to use nl80211/cfg80211 for everything.

15 years agoFixed a buffer overflow in nla_parse call
Jouni Malinen [Fri, 6 Jun 2008 13:51:17 +0000 (16:51 +0300)]
Fixed a buffer overflow in nla_parse call

The first argument (tb) to nla_parse must have room for maxtype+1, not
maxtype, elements.

15 years agoFix compile warnings on 64-bit systems
Pavel Roskin [Fri, 6 Jun 2008 11:17:03 +0000 (14:17 +0300)]
Fix compile warnings on 64-bit systems

Don't cast pointers to int in definitions of PRISM2_HOSTAPD_RID_HDR_LEN
and PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN.  Use size_t instead.  That's
actually what the code needs.

15 years agoUpdated the LibTomMath reference to use 0.41 version
Jouni Malinen [Fri, 6 Jun 2008 07:32:09 +0000 (10:32 +0300)]
Updated the LibTomMath reference to use 0.41 version

15 years agoRemoved the 20% estimate on faster bignum routines
Jouni Malinen [Fri, 6 Jun 2008 07:30:43 +0000 (10:30 +0300)]
Removed the 20% estimate on faster bignum routines

This was not accurate since this was mostly based on total runtime of an
eapol_test run. The real improvement in the bignum routines is much larger
(mayby twice as fast as before).

15 years agoCombined internal LibTomMath configuration into one option
Jouni Malinen [Fri, 6 Jun 2008 07:21:28 +0000 (10:21 +0300)]
Combined internal LibTomMath configuration into one option

CONFIG_INTERNAL_LIBTOMMATH_FAST=y in .config can now be used to enable all
optimized routines at a cost of about 4 kB. This is small enough increase
in size to justify simplified configuration.

15 years agoAdded an option to build internal LibTomMath with faster div routine
Jouni Malinen [Fri, 6 Jun 2008 07:11:17 +0000 (10:11 +0300)]
Added an option to build internal LibTomMath with faster div routine

At the cost of about 1 kB of additional binary size, the internal
LibTomMath can be configured to include faster div routine to speed up DH
and RSA. This can be enabled with CONFIG_INTERNAL_LIBTOMMATH_FAST_DIV=y in
.config.

15 years agoRead Michael MIC keys through TK2 union instead of offset from TK1
Jouni Malinen [Thu, 5 Jun 2008 18:00:56 +0000 (21:00 +0300)]
Read Michael MIC keys through TK2 union instead of offset from TK1

This gets rid of potential warnings about buffer bounds errors. The earlier
code works fine, but it is not the cleanest way of using the struct wpa_ptk
definition for TK1/TK2.

15 years agoFixed potential NULL pointer dereference if memory allocation fails
Jouni Malinen [Thu, 5 Jun 2008 17:44:30 +0000 (20:44 +0300)]
Fixed potential NULL pointer dereference if memory allocation fails

15 years agoFixed RADIUS client local address forcing for IPv6 (eapol_test)
Jouni Malinen [Thu, 5 Jun 2008 17:33:33 +0000 (20:33 +0300)]
Fixed RADIUS client local address forcing for IPv6 (eapol_test)

Need to use the IPv6 address data in bind() call if IPv6 is selected.

15 years agoAdd faster, optional sqr routine for internal LibTomMath
Jouni Malinen [Thu, 5 Jun 2008 15:33:46 +0000 (18:33 +0300)]
Add faster, optional sqr routine for internal LibTomMath

At the cost of about 0.5 kB of additional binary size, the internal
LibTomMath can be configured to include faster sqr routine to speed up DH
and RSA. This can be enabled with CONFIG_INTERNAL_LIBTOMMATH_FAST_SQR=y in
.config.