Commit graph

1979 commits

Author SHA1 Message Date
Marcin Marzec f400f4f34b Fix typo in WPA_AUTH_ALG_FT definition
This was not supposed to have duplicate value with WPA_AUTH_ALG_LEAP.
The previous version was unable to set FT as the authentication
algorithm with nl80211.
2010-03-07 21:02:55 +02:00
Jouni Malinen a4652ce64c wpa_gui: Remove unneeded wpa_ctrl_request() msg_cb 2010-03-07 17:28:00 +02:00
Jouni Malinen 0ebdf62735 Remove unnecessary ifname parameter from set_ap_wps_ie() driver op 2010-03-07 11:51:50 +02:00
Jouni Malinen d3e3a20565 Remove unnecessary ifname parameter from set_ht_params() driver op 2010-03-07 11:49:27 +02:00
Jouni Malinen 3234cba40e Remove unnecessary ifname parameter to sta_set_flags() driver op 2010-03-07 11:45:41 +02:00
Jouni Malinen 62847751e4 Remove unnecessary ifname parameter from sta_add() driver op 2010-03-07 11:42:41 +02:00
Jouni Malinen 8709de1ae8 Remove unnecessary ifname parameter from hapd_get_ssid/hapd_set_ssid 2010-03-07 11:36:45 +02:00
Jouni Malinen aa48451698 Remove unnecessary ifname parameter from set_generic_elem() driver op 2010-03-07 11:33:06 +02:00
Jouni Malinen d5dd016a8a Remove unneeded ifname parameter from set_privacy() driver op 2010-03-07 11:29:17 +02:00
Jouni Malinen 044372a333 driver_test: Use driver private BSS context instead of BSS lookup
The ifname-based lookup can now be replaced with the new mechanism that
allows driver wrappers to register per-BSS context data.
2010-03-07 11:26:35 +02:00
Jouni Malinen 70a8419f26 Avoid crash after driver init failure
hostapd_flush_old_stations() needs to check whether the driver
initialization was successful since it gets called on an error path.
2010-03-07 11:25:28 +02:00
Jouni Malinen 7ab68865c0 Remove unneeded iface parameter from if_add() driver op 2010-03-07 10:05:05 +02:00
Jouni Malinen 17557ebe30 Remove forgotten ifname parameter from set_beacon() call 2010-03-07 10:04:35 +02:00
Felix Fietkau 071799872f hostapd: fix a segfault in the error path of the nl80211 if_add function 2010-03-07 09:59:22 +02:00
Jouni Malinen 05ba8690cb nl80211: Unregister forgotten eloop socket on init failure 2010-03-06 22:37:48 +02:00
Jouni Malinen 8b897f5a17 Remove unnecessary ifname parameter from set_beacon()
The new per-BSS driver context makes this unnecessary.
2010-03-06 22:36:40 +02:00
Felix Fietkau 53f3d6f3e6 hostapd: allow stations to move between different bss interfaces
With this patch, a client gets kicked out of the last BSS it was
attached to, when it is associating to a different one.
While mac80211 does allow a station to be present on multiple bss
interfaces, this does seem to cause problems both for the stack
and for hostapd.
2010-03-06 22:30:25 +02:00
Felix Fietkau a2e40bb650 hostapd: Fix interface selection for the nl80211 driver
This patch allows the nl80211 driver to create its own per-bss context
and pass it to the drv_priv pointer of the hostapd bss state.
With this and the following patch, stations can associate to and switch
between multiple BSS interfaces of a single wiphy.
This obsoletes a few instances of passing ifname to a callback, those
can be removed in a separate patch.
It might also be useful to move more fields from the driver data to the
per-bss data structure in the future.
2010-03-06 22:22:56 +02:00
Felix Fietkau 39f42d1193 hostapd: fix bogus nl80211 interface remove messages for STA WDS 2010-03-06 20:52:22 +02:00
Felix Fietkau 4c32757d22 hostapd: add ifname to the sta_set_flags callback
This fixes multi-BSS STA operations (e.g., setting AUTHORIZED flag) with
nl80211-based drivers.
2010-03-06 20:44:31 +02:00
Jouni Malinen 23e2550c0e Remove unneeded CONFIG_EAP comments
These are not needed for WPS builds since CONFIG_WPS=y enables all
the needed EAP components.
2010-03-06 16:40:53 +02:00
Jouni Malinen ffd2c8cd4d Avoid warnings on unused function/variables if debug is disabled
CONFIG_NO_STDOUT_DEBUG removes wpa_printf() calls, so need to ifdef
some function and variable definitions to avoid compiler warnings.
2010-03-06 16:37:57 +02:00
Dmitry Shmidt aa53509ffe Update priority list after priority change
Despite comments in the wpa_config_update_prio_list(struct wpa_config
*config) telling that it is called "if priority for a network is
changed", it is apparently not.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-03-06 11:13:50 +02:00
Kel Modderman 09bd6e8cca wpa_supplicant: fix FTBFS on Debian GNU/kFreeBSD
This patch allows wpa_supplicant to compile on Debian's kfreebsd
architectures.

Patch by Stefan Lippers-Hollmann based on work done by Petr Salinger
and Emmanuel Bouthenot for 0.6.X (http://bugs.debian.org/480572).
2010-03-06 10:16:47 +02:00
Jouni Malinen d2f46a2b13 bsd: Use os_strlcpy instead of strlcpy 2010-03-06 10:04:41 +02:00
Jouni Malinen 3812464cda Add optional scan result filter based on SSID
filter_ssids=1 global configuration parameter can now be used to
enable scan result filtering (with -Dnl80211 only for now) based on
the configured SSIDs. In other words, only the scan results that have
an SSID matching with one of the configured networks are included in the
BSS table. This can be used to reduce memory needs in environments that
have huge number of APs.
2010-03-05 21:42:06 +02:00
Jouni Malinen c9c38b0996 Make maximum BSS table size configurable
New global configuration parameter bss_max_count can now be used to
change the maximum BSS table size. The old fixed size limit (200) is
used as the default value for this parameter.
2010-03-05 20:20:09 +02:00
Jouni Malinen ac26ebd8b5 Allow roam based on preferred BSSID regardless of signal strength 2010-02-28 11:09:58 +02:00
Jouni Malinen 36d1343a4b Do not inhibit suspend even if wpa_cli command fails
There is no point in inhibiting suspend in case wpa_supplicant is
not running and as such, return success unconditionally from this
script.
2010-02-27 20:03:13 +02:00
Jouni Malinen 207ef3fb12 Add suspend/resume notifications
wpa_supplicant can now be notified of suspend/resume events, e.g.,
from pm-action scripts. This allows wpa_supplicant to clear information
that may become invalid during a suspend operation.
2010-02-27 18:46:02 +02:00
Jouni Malinen be8be6717d Clear current_bss pointer on disassociation/deauthentication
This is needed to allow the BSS table entry for the previously used
BSS to be removed. Now wpa_bss_in_use() can return 0 for the last BSS
that was used as soon as deauthentication/disassociation event has been
received.
2010-02-27 18:40:25 +02:00
Jouni Malinen 159dd3e28a Add more debug prints to make deauth/disassoc events clearer 2010-02-27 18:39:09 +02:00
Jouni Malinen e824cc4648 Use os_snprintf instead of snprintf 2010-02-19 19:14:41 +02:00
Jouni Malinen 94d9bfd59b Rename EAP server source files to avoid duplicate names
This makes it easier to build both EAP peer and server functionality
into the same project with some toolchains.
2010-02-19 18:54:07 +02:00
Jouni Malinen 6fa2ec2d2b Make EAPOL Authenticator buildable with Microsoft compiler 2010-02-19 18:35:40 +02:00
Masashi Honma c6611ed995 bsd: Use device capability information
This patch enables the use of device capability information from the
driver when possible.
2010-02-16 19:47:00 +02:00
Jouni Malinen 58f6fbe05c nl80211: Add support for off-channel Action TX/RX commands
The kernel side support for this was just added into
wireless-testing.git. This commit adds the driver wrapper code needed
to allow wpa_supplicant to use the new functionality.
2010-02-16 19:41:49 +02:00
Jouni Malinen b7a2b0b68c Add alloc_interface_addr() drv op option for specifying ifname
Some drivers may need to use a specific ifname for the virtual
interface, so allow them to do this with a new parameter passed
to the alloc_interface_addr() handler.
2010-02-16 19:34:51 +02:00
Jouni Malinen 01b350ed74 Sync with linux/nl80211.h from wireless-testing.git 2010-02-16 19:28:38 +02:00
Jouni Malinen cbf7855883 wpa_cli: Add option to use child process to receive events
CFLAGS += -DCONFIG_WPA_CLI_FORK=y in .config can be used to
configure wpa_cli build to make a version of wpa_cli that forks
a child process to receive event messages. This allows the events
to be shown immediately instead of having to wait for the next
periodic poll with PING.
2010-02-14 16:14:20 +02:00
Jouni Malinen 25ac1328f6 EAP-TNC: Add Flags field into fragment acknowledgement
TNC IF-T is somewhat unclear on this are, but
draft-hanna-nea-pt-eap-00.txt, which is supposed to define the same
protocol, is clearer on the Flags field being included.

This change breaks interoperability with the old implementation if
EAP-TNC fragmentation is used. The old version would not accept
the acknowledgement message with the added Flags octet while the
new version accepts messagss with with both options.
2010-02-14 16:08:15 +02:00
Jouni Malinen 4a3ade4e11 wpa_gui: Use separate ctrl_iface connection for event messages 2010-02-13 21:37:35 +02:00
Jouni Malinen 62477841a1 EAP-TNC server: Fix processing when last message is fragmented
If the last message from the EAP-TNC server was fragmented, the
fragment processing lost the DONE/FAIL state and did not know how
to handle the final ACK from the peer. Fix this by remembering the
earlier DONE/FAIL state when fragmenting a frame.
2010-02-13 18:03:52 +02:00
Jouni Malinen b29d086d50 EAP-TNC: Accept fragment ack frame with Flags field
TNC IF-T specification is unclear on the exact contents of the fragment
acknowledgement frame. An interoperability issue with the tncs@fhh
implementation was reported by Arne Welzel
<arne.welzel@stud.fh-hannover.de> due to the different interpretations
of the specification. Relax EAP-TNC server/peer validation rules to
accept fragmentation acknowledgement frames to include the Flags field
to avoid this issue.
2010-02-13 18:00:39 +02:00
Kel Modderman aff5e54d4a wpa_gui-qt4: do not show WPS AP available event tray messages
Do not show WPS event tray messages as they can happen too frequently.

Signed-off-by: Kel Modderman <kel@otaku42.de>
2010-02-13 14:03:18 +02:00
Masashi Honma 0c6bdf91ea bsd: Aggregate ioctl routines
This patch aggregates ioctls.

First is SIOCS80211. The SIOCS80211's arguments has 3 couples.
        1-1. i_len, i_data
        1-2. i_val
        1-3. i_len, i_data, i_val (currently only IEEE80211_IOC_APPIE)
There were 3 routines for each cases. This patch aggregates these to
one.

Second is SIOCG80211. The SIOCG80211 returns 2 type of value.
        2-1. i_len
        2-2. i_val
There were 2 routines for each cases. This patch aggregates these to
one.

I have tested on both FreeBSD 8.0 and NetBSD 5.0.1 with these cases.

[hostapd]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(STA)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(AP)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)
2010-02-13 13:59:29 +02:00
Masashi Honma 88487b0e0b FreeBSD: Add support for FreeBSD 8.0 STA/AP
This patch adds both wpa_supplicant and hostapd support for
FreeBSD 8.0.

I refered
http://www.jp.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/wpa/hostapd/driver_freebsd
.c
http://www.jp.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/wpa/wpa_supplicant/driver_
freebsd.c

I have tested on FreeBSD 8.0 with these cases.

[hostapd]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(STA)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(AP)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)
2010-02-13 13:57:39 +02:00
Masashi Honma 362468d117 FreeBSD: Enable channel control
This patch enables FreeBSD channel control.

I have tested on FreeBSD 7.2 with these cases.

[hostapd]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(STA)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(AP)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)
2010-02-13 13:54:27 +02:00
Masashi Honma e1b1309b6a bsd: Unify wpa_driver_bsd_ops
The attached patch unifies hostapd wpa_driver_bsd_ops and
wpa_supplicant wpa_driver_bsd_ops.

I have tested on NetBSD 5.0.1 with these cases.

[hostapd]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(STA)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(AP)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)
2010-02-13 13:52:03 +02:00
Masashi Honma 86b24ea93c bsd: Unify struct bsd_driver_data and struct wpa_driver_bsd_data
This patch unifies struct bsd_driver_data and struct wpa_driver_bsd_data.
2010-02-13 13:50:19 +02:00