]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
14 years agoPreparations for v0.7.0 release hostap_0_7_0
Jouni Malinen [Sat, 21 Nov 2009 20:49:02 +0000 (22:49 +0200)] 
Preparations for v0.7.0 release

14 years agoWPS: Do not try to send byebye advertisements if socket is not valid
Jouni Malinen [Sat, 21 Nov 2009 20:00:33 +0000 (22:00 +0200)] 
WPS: Do not try to send byebye advertisements if socket is not valid

If initialization fails, we could potentially try to sendto() on -1
socket which would fail. No point in doing that, so just return early
from the function.

14 years agoFix Visual Studio projects to match with source code file changes
Jouni Malinen [Sat, 21 Nov 2009 19:56:31 +0000 (21:56 +0200)] 
Fix Visual Studio projects to match with source code file changes

14 years agoUpdate ChangeLog files for 0.7.0 release
Jouni Malinen [Sat, 21 Nov 2009 19:53:51 +0000 (21:53 +0200)] 
Update ChangeLog files for 0.7.0 release

14 years agoFix a typo in a comment
Jouni Malinen [Sat, 21 Nov 2009 19:13:19 +0000 (21:13 +0200)] 
Fix a typo in a comment

14 years agowpa_gui: Only move to WPS tab if inactive/disconnect and AP ready
Jouni Malinen [Sat, 21 Nov 2009 18:52:55 +0000 (20:52 +0200)] 
wpa_gui: Only move to WPS tab if inactive/disconnect and AP ready

This removes many of the cases where moving to the WPS tab can be
undesired. It is really only useful if we are not currently connected
and there is an AP available that would likely be able to provide us
network connectivity with use of WPS (active PBC more or selected
registrar set).

14 years agoOpenSSL: Remove unneeded MinGW CryptoAPI compat code
Jouni Malinen [Sat, 21 Nov 2009 18:33:41 +0000 (20:33 +0200)] 
OpenSSL: Remove unneeded MinGW CryptoAPI compat code

The current MinGW/w32api versions seem to provide all the needed CryptoAPI
functions, so the code for loading these dynamically from the DLL can be
removed.

14 years agoGnuTLS: Fix compilation with newer GnuTLS versions
Jouni Malinen [Sat, 21 Nov 2009 18:23:58 +0000 (20:23 +0200)] 
GnuTLS: Fix compilation with newer GnuTLS versions

Avoid duplicate defination of TLS_RANDOM_SIZE and TLS_MASTER_SIZE.

14 years agoFix strict aliasing issue with the internal SHA-1 implementation
Jouni Malinen [Sat, 21 Nov 2009 18:17:24 +0000 (20:17 +0200)] 
Fix strict aliasing issue with the internal SHA-1 implementation

Need to define the workspace buffer properly to allow compiler to handle
strict aliasing between the incoming unsigned char[64] buffer as an u32
array. The previous version built with strict aliasing enabled can
result in SHA-1 producing incorrect results and consequently, with
4-way handshake failing.

This is based on a report and patch from Dan Williams <dcbw@redhat.com>
but with a different type (the union) used as a fix to avoid needing
extra type casting.

Discovered as part of the investigation of:

https://bugzilla.redhat.com/show_bug.cgi?id=494262#c32

if sha1 is built with gcc without turning off strict aliasing, it will
fail to correctly generate the hashes and will fail its own testcases as
well.

Signed-off-by: Dan Williams <dcbw@redhat.com>
14 years agoWPS ER: Deinitialize protocol instance with STA after completion
Jouni Malinen [Sat, 21 Nov 2009 16:39:12 +0000 (18:39 +0200)] 
WPS ER: Deinitialize protocol instance with STA after completion

In addition, remove the WPS ER Enrollee entry 10 seconds after
successful completion of the protocol run.

14 years agowpa_gui: Add peers menu option for learning AP configuration (ER)
Jouni Malinen [Sat, 21 Nov 2009 16:26:21 +0000 (18:26 +0200)] 
wpa_gui: Add peers menu option for learning AP configuration (ER)

14 years agoWPS ER: Use random event identifier in event URL
Jouni Malinen [Sat, 21 Nov 2009 16:15:37 +0000 (18:15 +0200)] 
WPS ER: Use random event identifier in event URL

This avoids some issues in cases where the ER has been started and
stopped multiple times on the same address and an AP may have stored
multiple event notification addresses for the same ER. The random
identifier allows the ER to filter out unexpected messages from further
processing.

14 years agoWPS: Cleanup subscription URL list handling
Jouni Malinen [Sat, 21 Nov 2009 16:06:02 +0000 (18:06 +0200)] 
WPS: Cleanup subscription URL list handling

Do not give the allocated memory to the subscription code since it was
not using it as-is anyway. This makes it easier to understand who owns
the allocation an is responsible of freeing it. This may potentially
fix some memory leaks on error paths.

14 years agoWPS ER: Move SSDP functionality into a separate file
Jouni Malinen [Sat, 21 Nov 2009 15:26:23 +0000 (17:26 +0200)] 
WPS ER: Move SSDP functionality into a separate file

14 years agowpa_gui: Add peer dialog option for WPS PBC
Jouni Malinen [Sat, 21 Nov 2009 15:06:41 +0000 (17:06 +0200)] 
wpa_gui: Add peer dialog option for WPS PBC

Use advertised configuration methods to determine whether WPS PBC
and/or PIN methods should be allowed.

14 years agowpa_gui: Add WPS config methods and device password ID into peer data
Jouni Malinen [Sat, 21 Nov 2009 14:47:48 +0000 (16:47 +0200)] 
wpa_gui: Add WPS config methods and device password ID into peer data

14 years agowpa_gui: Move peer tooltip into Properties dialog
Jouni Malinen [Sat, 21 Nov 2009 13:01:23 +0000 (15:01 +0200)] 
wpa_gui: Move peer tooltip into Properties dialog

Clean up the peer dialog information to be more user friendly. Only
show the device type in the tooltip and move the verbose details into
a separate area in a new Properties dialog. The new dialog will also
show some of the standard fields with titles to make them easier to
read.

14 years agoWPS ER: Add more AP information into the ctrl_interface message
Jouni Malinen [Sat, 21 Nov 2009 11:34:23 +0000 (13:34 +0200)] 
WPS ER: Add more AP information into the ctrl_interface message

This allow wpa_gui to show AP BSSID, WPS State (configured/unconfigured),
and primary device type.

14 years agoWPS ER: Fetch AP's M1 to learn device type and WPS state
Jouni Malinen [Sat, 21 Nov 2009 11:13:02 +0000 (13:13 +0200)] 
WPS ER: Fetch AP's M1 to learn device type and WPS state

14 years agoWPS ER: Use (addr,UUID) as the key for AP entries
Jouni Malinen [Sat, 21 Nov 2009 10:51:40 +0000 (12:51 +0200)] 
WPS ER: Use (addr,UUID) as the key for AP entries

This allows multiple WPS AP instances to be supported per IP address.

14 years agoWPS ER: Stop AP unlink loop on match
Jouni Malinen [Sat, 21 Nov 2009 10:18:24 +0000 (12:18 +0200)] 
WPS ER: Stop AP unlink loop on match

There is no need to continue through the list after this, since the
same AP entry can only be listed once.

14 years agoWPS ER: Move STA entry unlinking into a separate function
Jouni Malinen [Sat, 21 Nov 2009 10:18:03 +0000 (12:18 +0200)] 
WPS ER: Move STA entry unlinking into a separate function

14 years agoWPS ER: Fix AP entry freeing on timeout
Jouni Malinen [Sat, 21 Nov 2009 10:12:49 +0000 (12:12 +0200)] 
WPS ER: Fix AP entry freeing on timeout

Must unlink the entry first before trying to remove it to avoid
leaving behind pointers to freed memory.

14 years agoWPS ER: Refresh ER data on WPS_ER_START when already started
Jouni Malinen [Fri, 20 Nov 2009 19:57:30 +0000 (21:57 +0200)] 
WPS ER: Refresh ER data on WPS_ER_START when already started

This sends out the AP and Enrollee notifications for all tracked
devices and generates a new SSDP search to find more APs.

14 years agoWPS ER: Fix Enrollee entry freeing on timeout
Jouni Malinen [Fri, 20 Nov 2009 19:56:39 +0000 (21:56 +0200)] 
WPS ER: Fix Enrollee entry freeing on timeout

Must unlink the entry first before trying to remove it to avoid
leaving behind pointers to freed memory.

14 years agoAdd 'none' driver as an option for wpa_supplicant
Jouni Malinen [Fri, 20 Nov 2009 19:12:49 +0000 (21:12 +0200)] 
Add 'none' driver as an option for wpa_supplicant

This can be used, e.g., with WPS ER when no network interface is
actually used for IEEE 802.1X or wireless operations.

14 years agowpa_gui: Avoid using freed item in enter_pin()
Jouni Malinen [Thu, 19 Nov 2009 19:12:06 +0000 (21:12 +0200)] 
wpa_gui: Avoid using freed item in enter_pin()

The Enrollee entry may be deleted while the PIN query dialog is open.
To avoid crashing on using freed entry, copy the needed data into
local variables before and use the local data after the PIN dialog
has been closed.

14 years agowpa_gui: Add AP and laptop icons for peer dialog
Jouni Malinen [Thu, 19 Nov 2009 19:03:25 +0000 (21:03 +0200)] 
wpa_gui: Add AP and laptop icons for peer dialog

The peer entries are now using different icons based on their type. As
a starting point, a separate AP and laptop icons are used. More icons may
be added in the future to mark different device types (e.g., based on
primary device type information from WPS).

14 years agowpa_gui: Add support for multiple icon files
Mike Shepherd [Thu, 19 Nov 2009 18:49:51 +0000 (20:49 +0200)] 
wpa_gui: Add support for multiple icon files

14 years agowpa_gui: Add preliminary WPS ER support into the peers dialog
Jouni Malinen [Thu, 19 Nov 2009 18:28:41 +0000 (20:28 +0200)] 
wpa_gui: Add preliminary WPS ER support into the peers dialog

14 years agoWPS: Fix MAC Address inside Credential be that of Enrollee's
Jouni Malinen [Wed, 18 Nov 2009 22:31:57 +0000 (00:31 +0200)] 
WPS: Fix MAC Address inside Credential be that of Enrollee's

The WPS 1.0h specification is quite unclear on what exactly should be
used as the MAC Address value in the Credential and AP Settings. It
looks like this should after all be the MAC Address of the Enrollee,
so change Registrar implementation to use that address instead of the
AP BSSID.

In addition, add validation code to the Enrollee implementation to
check the MAC Address value inside Credential (and also inside AP Settings)
to make sure it matches with the Enrollee's own address. However, since
there are deployed implementations that do not follow this interpretation
of the spec, only show the mismatch in debug information to avoid breaking
interoperability with existing devices.

14 years agonl80211/SME: Use reassociation when roaming within the ESS
Jouni Malinen [Tue, 17 Nov 2009 17:25:05 +0000 (19:25 +0200)] 
nl80211/SME: Use reassociation when roaming within the ESS

14 years agowpa_supplicant: Fix ctrl_interface group permissions to allow read/execute
Anders Aspegren Søndergaard [Mon, 16 Nov 2009 14:43:25 +0000 (16:43 +0200)] 
wpa_supplicant: Fix ctrl_interface group permissions to allow read/execute

When using umask 0077, the control interface directory was left without
group read/execute permissions even if the configuration file explicitly
asked for the group to be allowed to access the control interface. Fix
this by adding read/execute permissions for group if a specific group is
defined in the configuration. [Bug 199]

14 years agohostapd: Fix endian bugs in STA HT capability handling
Felix Fietkau [Mon, 16 Nov 2009 11:58:08 +0000 (13:58 +0200)] 
hostapd: Fix endian bugs in STA HT capability handling

14 years agohostapd: Fix BSS channel checks in 40 MHz scan
Felix Fietkau [Mon, 16 Nov 2009 11:52:12 +0000 (13:52 +0200)] 
hostapd: Fix BSS channel checks in 40 MHz scan

14 years agodbus: Allow only root to receive signals
Witold Sowa [Mon, 16 Nov 2009 11:25:51 +0000 (13:25 +0200)] 
dbus: Allow only root to receive signals

Change the dbus policy file to only allow root applications to receive
signals from wpa_supplicant. This keeps WPS Credentials data secret
from non-root listeners.

14 years agowpa_gui-qt4: Fix build with Session Manager disabled in Qt4
Christian Rüb [Mon, 16 Nov 2009 11:20:53 +0000 (13:20 +0200)] 
wpa_gui-qt4: Fix build with Session Manager disabled in Qt4

When trying to build wpa_gui (Qt4 version) from openembedded it fails
because Qt4 is compiled without session manager and thus wpa_gui fails
to compile.

I attached a patch, that enables compiling without Session Manager (via
preprocessor) if it is not compiled into Qt4; otherwise, it behaves as
it does right now.

I checked to build on my host (Debian unstable, Session Manager
enabled) and openembedded (Session Manager disabled).

14 years agoWPS ER: Clear WPS protocol run on PutMessage failure
Jouni Malinen [Sun, 15 Nov 2009 20:56:39 +0000 (22:56 +0200)] 
WPS ER: Clear WPS protocol run on PutMessage failure

14 years agoWPS ER: Deinit WPS protocol data when freeing AP entry
Jouni Malinen [Sun, 15 Nov 2009 20:53:10 +0000 (22:53 +0200)] 
WPS ER: Deinit WPS protocol data when freeing AP entry

14 years agoWPS ER: Deinit ER before WPS registrar/context
Jouni Malinen [Sun, 15 Nov 2009 20:52:17 +0000 (22:52 +0200)] 
WPS ER: Deinit ER before WPS registrar/context

ER code may still touch WPS registrar/context during deinit, so better
do that before freeing the other WPS components.

14 years agoWPS ER: Use learnt AP settings to build credentials for an Enrollee
Jouni Malinen [Sun, 15 Nov 2009 20:46:30 +0000 (22:46 +0200)] 
WPS ER: Use learnt AP settings to build credentials for an Enrollee

14 years agoWPS ER: Add command for fetching current AP settings
Jouni Malinen [Sun, 15 Nov 2009 20:27:06 +0000 (22:27 +0200)] 
WPS ER: Add command for fetching current AP settings

14 years agoWPS: Determine the OpCode based on message type attribute (UPnP)
Jouni Malinen [Sun, 15 Nov 2009 20:23:49 +0000 (22:23 +0200)] 
WPS: Determine the OpCode based on message type attribute (UPnP)

This allows WSC_ACK and WSC_NACK to be processed correctly in the AP
when operating as an Enrollee with an ER over UPnP transport.

14 years agoWPS ER: Do not try to process AP Settings in proxied M7 to ER
Jouni Malinen [Sun, 15 Nov 2009 16:54:37 +0000 (18:54 +0200)] 
WPS ER: Do not try to process AP Settings in proxied M7 to ER

In this case, the Enrollee is not an AP, so do not try to process
AP Settings in M7.

14 years agoWPS ER: Add preliminary PBC support
Jouni Malinen [Sun, 15 Nov 2009 16:46:03 +0000 (18:46 +0200)] 
WPS ER: Add preliminary PBC support

This will need some additional code in wps_er_pbc() to handle PBC mode
enabling for a single AP only. For now, this can only be expected to work
when the ER is connected to a single AP.

14 years agoWPS ER: Only send Enrollee notification on Probe Request and M1
Jouni Malinen [Sun, 15 Nov 2009 16:29:19 +0000 (18:29 +0200)] 
WPS ER: Only send Enrollee notification on Probe Request and M1

No need to do this for M3..M7 or NACK/ACK/Done messages.

14 years agoWPS: Do not use ASCII-dump on binary PutWLANResponse NewMessage
Jouni Malinen [Sun, 15 Nov 2009 16:28:59 +0000 (18:28 +0200)] 
WPS: Do not use ASCII-dump on binary PutWLANResponse NewMessage

14 years agoWPS ER: Add ctrl_iface notifications for AP/Enrollee add/remove
Jouni Malinen [Sun, 15 Nov 2009 10:07:27 +0000 (12:07 +0200)] 
WPS ER: Add ctrl_iface notifications for AP/Enrollee add/remove

14 years agoWPS ER: Store AP UUID in binary format for future use
Jouni Malinen [Sun, 15 Nov 2009 09:07:20 +0000 (11:07 +0200)] 
WPS ER: Store AP UUID in binary format for future use

14 years agoWPS: Use a dummy WSC_ACK as WLANEvent as the initial event if needed
Jouni Malinen [Sat, 14 Nov 2009 23:11:28 +0000 (01:11 +0200)] 
WPS: Use a dummy WSC_ACK as WLANEvent as the initial event if needed

UPnP device architecture specification requires all evented variables to
be included in the initial event message after subscription. Since this
can happen before we have seen any events, generated a dummy event
(WSC_ACK with all-zeros nonces) if needed.

14 years agoWPS: Send SSDP byebye notifications when stopping UPnP advertisements
Jouni Malinen [Sat, 14 Nov 2009 22:46:58 +0000 (00:46 +0200)] 
WPS: Send SSDP byebye notifications when stopping UPnP advertisements

This will notify control points of the services going away and allows
them to notice this without having to wait timeout on the
initial advertisements.

14 years agodbus: Use method/property/signal handler arrays for registration
Jouni Malinen [Sat, 14 Nov 2009 16:18:07 +0000 (18:18 +0200)] 
dbus: Use method/property/signal handler arrays for registration

Clean up registration of large number of dbus method/property/signal
handlers by using arrays containing all the information needed to call
the registration functions.

14 years agodbus: Remove duplicated error printing from registration
Jouni Malinen [Sat, 14 Nov 2009 15:06:16 +0000 (17:06 +0200)] 
dbus: Remove duplicated error printing from registration

wpa_dbus_{method,property,signal}_register() are now taking care of
error printing, so no need to duplicate the same code everywhere.

14 years agodbus: Split wpas_dbus_ctrl_iface_init() into helper functions
Jouni Malinen [Sat, 14 Nov 2009 14:57:07 +0000 (16:57 +0200)] 
dbus: Split wpas_dbus_ctrl_iface_init() into helper functions

Clean up the method/property/signal registration code by using short
helper functions with the argument table near the registration call.

14 years agodbus: Minor coding style cleanup
Jouni Malinen [Sat, 14 Nov 2009 14:02:01 +0000 (16:02 +0200)] 
dbus: Minor coding style cleanup

14 years agodbus: Fix some of the function comment typos
Jouni Malinen [Sat, 14 Nov 2009 13:57:02 +0000 (15:57 +0200)] 
dbus: Fix some of the function comment typos

14 years agoWPS: Remove derivation of management keys
Jouni Malinen [Sat, 14 Nov 2009 12:18:15 +0000 (14:18 +0200)] 
WPS: Remove derivation of management keys

MgmtAuthKey and MgmtEncKey were not used for anything and are unlikely
to ever be used, so better remove the code to reduce binary size.

14 years agoWPS: Remove unused WFA WLANConfig Service actions
Jouni Malinen [Sat, 14 Nov 2009 12:08:58 +0000 (14:08 +0200)] 
WPS: Remove unused WFA WLANConfig Service actions

This removes following WFA WLANConfig Service actions and the related
state variables: GetAPSettings, SetAPSettings, DelAPSettings,
GetSTASettings, SetSTASettings, DelSTASettings, RebootAP,
ResetAP, RebootSTA, ResetSTA.

While WFA WLANConfig Service version 1.0 claims that some of these are
mandatory to implement for an AP, there are no known implementations
supporting these actions neither in an AP/proxy or an External Registrar
that would use them. These are unlikely to be supported in the future
either and as such, it is just simpler to get rid of them to clean up
the implementation and reduce code size.

14 years agoWPS ER: Fix Op-Code for WSC_{ACK,NACK,Done}
Jouni Malinen [Fri, 13 Nov 2009 20:40:27 +0000 (22:40 +0200)] 
WPS ER: Fix Op-Code for WSC_{ACK,NACK,Done}

When using UPnP transport, the Op-Code is not included, but the WPS
frame processing will need this. Generate a matching Op-Code based
on the message type.

14 years agoWPS: Fix AP to proxy WSC_NACK to ER
Jouni Malinen [Fri, 13 Nov 2009 20:40:07 +0000 (22:40 +0200)] 
WPS: Fix AP to proxy WSC_NACK to ER

14 years agoWPS: Fix OpCode when proxying WSC_ACK or WSC_NACK from ER
Jouni Malinen [Fri, 13 Nov 2009 20:29:31 +0000 (22:29 +0200)] 
WPS: Fix OpCode when proxying WSC_ACK or WSC_NACK from ER

Previously, WSC_MSG was hardcoded for every message from ER, but
this needs to be changed based on message type to send a valid
message to the Enrollee via EAP transport.

14 years agoWPS ER: Add PIN configuration and SetSelectedRegistrar call
Jouni Malinen [Fri, 13 Nov 2009 20:07:11 +0000 (22:07 +0200)] 
WPS ER: Add PIN configuration and SetSelectedRegistrar call

New PINs can now be added to WPS ER. This results in the ER code
using SetSelectedRegistrar to modify AP state so that Enrollees
will be able to notice the actice registrar more easily.

14 years agoWPS: Fix http_link_update() to nul terminate the result
Jouni Malinen [Fri, 13 Nov 2009 20:05:11 +0000 (22:05 +0200)] 
WPS: Fix http_link_update() to nul terminate the result

14 years agoWPS ER: Add PutWLANResponse generation and transmission
Jouni Malinen [Wed, 11 Nov 2009 23:24:50 +0000 (01:24 +0200)] 
WPS ER: Add PutWLANResponse generation and transmission

This allows the M2D message to be transmitted as a response to the
Enrollee via the proxying AP.

14 years agoWPS ER: Add STA/Enrollee entries and start processing EAP messages
Jouni Malinen [Wed, 11 Nov 2009 21:50:17 +0000 (23:50 +0200)] 
WPS ER: Add STA/Enrollee entries and start processing EAP messages

This keeps STA/Enrollee entries up to date and sets up registration
protocol session. M1 is processed and M2D generated, but the there
is no code yet to transmit the response back to the AP with
PutWLANResponse.

14 years agoRemove a note about other repositories of wpa_supplicant
Jouni Malinen [Wed, 11 Nov 2009 15:56:21 +0000 (17:56 +0200)] 
Remove a note about other repositories of wpa_supplicant

14 years agoReset EAPOL pointer when handling DBus smartcard parameters
David Smith [Wed, 11 Nov 2009 15:46:15 +0000 (17:46 +0200)] 
Reset EAPOL pointer when handling DBus smartcard parameters

Smartcard parameter update via DBus ended up re-initializing the EAPOL
state machine without updating the pointer inside WPA state machine.
This can trigger a segfault when EAP layer attempts to use the old
reference. Fix this by re-initializing the pointer inside WPA state
machine.

14 years agoDisassociate STA if it associated with invalid/missing WPA/RSN IE
Andriy Tkachuk [Wed, 11 Nov 2009 15:33:55 +0000 (17:33 +0200)] 
Disassociate STA if it associated with invalid/missing WPA/RSN IE

When using drivers that process management frames internally (e.g.,
madwifi, atheros, bsd), the driver may accept association with IEs
that do not match the security policy. Instead of silently leaving
the station associated, explicitly disassociate it to clear the
driver entry immediately.

14 years agoAdd dbus mechanism for fetching all network configuration parameters
Witold Sowa [Wed, 11 Nov 2009 15:17:00 +0000 (17:17 +0200)] 
Add dbus mechanism for fetching all network configuration parameters

14 years agoAdd notifications for scan result BSS changes (added/removed)
Witold Sowa [Wed, 11 Nov 2009 15:07:53 +0000 (17:07 +0200)] 
Add notifications for scan result BSS changes (added/removed)

If scan results introduce new BSSs or discards some previously known,
new wpas_notify_bss_added or wpas_notify_bss_removed notifications are
called.

14 years agohostapd: fix AP mode initialization for nl80211
Felix Fietkau [Wed, 11 Nov 2009 14:47:01 +0000 (16:47 +0200)] 
hostapd: fix AP mode initialization for nl80211

Always bring down the wlan interface, even when not changing the
BSSID, the interface also needs to be down for changing its type
from managed to AP mode.

14 years agoWPS ER: Parse WLANEvent notifications and send HTTP response
Jouni Malinen [Tue, 10 Nov 2009 22:23:22 +0000 (00:23 +0200)] 
WPS ER: Parse WLANEvent notifications and send HTTP response

The receive Probe Request and EAP-WSC notifications are now parsed
(including the TLVs in them) and contents is shown in the debug log.
Actual processing of the received information is still missing (TODO
comments indicate the needed functionality).

14 years agodbus: Use snprintf() and bounds checking instead of strcat()
Jouni Malinen [Tue, 10 Nov 2009 16:29:38 +0000 (18:29 +0200)] 
dbus: Use snprintf() and bounds checking instead of strcat()

Better make sure we do not end up writing over the end of the local
registered_sig buffer regardless of how many arguments are used in
dbus method description.

14 years agodbus: Do not dereference wpa_s if explicitly checking it is not NULL
Jouni Malinen [Tue, 10 Nov 2009 16:20:12 +0000 (18:20 +0200)] 
dbus: Do not dereference wpa_s if explicitly checking it is not NULL

There is no point checking whether wpa_s is not NULL after having
dereferenced it earlier in the function.. Furthermore, there is no
need to use a local variable for wpas_dbus_get_path() result.

14 years agodbus: Remove unnecessary wpa_s->bssid comparison
Jouni Malinen [Tue, 10 Nov 2009 16:11:18 +0000 (18:11 +0200)] 
dbus: Remove unnecessary wpa_s->bssid comparison

This is an array and cannot have NULL value.

14 years agodbus: Fix a NULL pointer dereference on error path
Jouni Malinen [Tue, 10 Nov 2009 16:08:55 +0000 (18:08 +0200)] 
dbus: Fix a NULL pointer dereference on error path

The cleanup routine in the end would have dereferenced props pointer
which could be NULL. There is no need to go through that cleanup code
in this case, so just exit from the function with return instead.

14 years agoCall wpas_notify_network_selected only if a specific network was selected
Jouni Malinen [Tue, 10 Nov 2009 16:06:02 +0000 (18:06 +0200)] 
Call wpas_notify_network_selected only if a specific network was selected

ssid could be NULL here at least based on the function documentation,
so better check whether that is the case prior to calling the
notification function.

14 years agoFix per-SSID scan (scan_ssid=1)
Jouni Malinen [Tue, 10 Nov 2009 16:00:57 +0000 (18:00 +0200)] 
Fix per-SSID scan (scan_ssid=1)

Commit d3a9822542166e7adec16e24622486ba90359ef5 broke per-SSID scan
by using the ssid variable for internal loop and by doing so,
overriding the value that was needed below to figure out whether the
scan is for a specific SSID. Fix this by using a temporary variable
instead when looping over network finding which frequencies to scan for.

14 years agodbus: Coding style cleanup
Jouni Malinen [Tue, 10 Nov 2009 15:51:59 +0000 (17:51 +0200)] 
dbus: Coding style cleanup

14 years agodriver_prism54: Use os_zalloc instead of malloc to clear memory
Jouni Malinen [Tue, 10 Nov 2009 15:08:33 +0000 (17:08 +0200)] 
driver_prism54: Use os_zalloc instead of malloc to clear memory

This will make sure the full buffer is initialized even if some
fields were not explicitly set.

14 years agoFix use-after-free issue with pid_file in hostapd termination
Jouni Malinen [Tue, 10 Nov 2009 15:05:28 +0000 (17:05 +0200)] 
Fix use-after-free issue with pid_file in hostapd termination

14 years agoWPS: Fix credential processing for open network case
Jouni Malinen [Tue, 10 Nov 2009 15:01:26 +0000 (17:01 +0200)] 
WPS: Fix credential processing for open network case

There is no point in comparing cred->key == NULL since cred->key is
an array (never NULL). key_len == 0 should be used instead to indicate
that no key was specified.

14 years agoFix hlr_auc_gw build (wpabuf.o is needed now for tls_openssh)
Jouni Malinen [Tue, 10 Nov 2009 14:53:47 +0000 (16:53 +0200)] 
Fix hlr_auc_gw build (wpabuf.o is needed now for tls_openssh)

14 years agoFix comparison to use correct symbol name (__rand vs. rand)
Jouni Malinen [Tue, 10 Nov 2009 14:51:59 +0000 (16:51 +0200)] 
Fix comparison to use correct symbol name (__rand vs. rand)

rand would be the address of rand() function and never NULL. The previous
version could have crashed on invalid AKA-AUTS command. Though, these
commands are only from hostapd which sends valid requests and as such,
the actual issue did not show up.

14 years agodbus: Remove unneeded typecast
Jouni Malinen [Tue, 10 Nov 2009 14:48:21 +0000 (16:48 +0200)] 
dbus: Remove unneeded typecast

This was triggering some gcc versions to warn about strict aliasing.
Since the typecast is not really needed here, the cleanest way to get
rid of the warnings is to just use the correct type for the local
variable.

14 years agoAdd wpa_msg_ctrl() for ctrl_interface-only messages
Jouni Malinen [Tue, 10 Nov 2009 13:59:41 +0000 (15:59 +0200)] 
Add wpa_msg_ctrl() for ctrl_interface-only messages

This is like wpa_msg(), but the output is directed only to
ctrl_interface listeners. In other words, the output will not be
shown on stdout or in syslog.

Change scan result reporting to use wpa_msg_ctrl() for
CTRL-EVENT-SCAN-RESULTS message at info level and wpa_printf() at
debug level to avoid showing scan result events in syslog in the
common configuration used with NetworkManager.

14 years agoInclude hostapd source code in wpa_supplicant release package
Jouni Malinen [Tue, 10 Nov 2009 09:55:55 +0000 (11:55 +0200)] 
Include hostapd source code in wpa_supplicant release package

This is needed to be able to build with CONFIG_AP=y.

14 years agoFix non-WPS build
Jouni Malinen [Tue, 10 Nov 2009 09:35:25 +0000 (11:35 +0200)] 
Fix non-WPS build

14 years agoWPS: Fixed printf size_t warning on 32-bit builds
Jouni Malinen [Tue, 10 Nov 2009 09:30:11 +0000 (11:30 +0200)] 
WPS: Fixed printf size_t warning on 32-bit builds

14 years agoWPS: Fix WPS build with ER support disabled
Jouni Malinen [Tue, 10 Nov 2009 09:09:52 +0000 (11:09 +0200)] 
WPS: Fix WPS build with ER support disabled

14 years agoReplace "git-archive" with "git archive" to fix release build
Jouni Malinen [Tue, 10 Nov 2009 09:08:15 +0000 (11:08 +0200)] 
Replace "git-archive" with "git archive" to fix release build

14 years agowpa_supplicant: new DBus API implementation
Witold Sowa [Mon, 9 Nov 2009 21:51:59 +0000 (23:51 +0200)] 
wpa_supplicant: new DBus API implementation

This patch implements the new DBus API. Both, the new and the
previous API may work concurrently and may be turned on or off
separately in .config file.
Some features of the new API are:
 - more wpa_supplicant's events are signaled with DBus signals,
 - introspection data (requires libxml2 and may be disabled),
 - CurrentBSS and CurrentNetwork properties,
 - PropertyChanged signal for most of properties,
 - Relatively easy to extend.
.config options for the new API are: CONFIG_CTRL_IFACE_DBUS_NEW=y and
CONFIG_CTRL_IFACE_DBUS_INTRO=y for introspection.

This commit misses couple of parts from the full implementation
(these are still under review):
- fetching all configuration parameters for learning WPS information
- scan result BSS add/remove notification (register_bss() and
  unregister_bss() notification callbacks)

14 years agoWPS ER: Subscribe to UPnP events
Jouni Malinen [Mon, 9 Nov 2009 18:01:50 +0000 (20:01 +0200)] 
WPS ER: Subscribe to UPnP events

This adds code to start a HTTP server and to subscribe to UPnP events
from each discovered WPS AP. The event messages are received, but there
is not yet any code to actually parse the contents of the event.

14 years agoWPS: Read HTTP request within HTTP server code
Jouni Malinen [Sun, 8 Nov 2009 20:33:34 +0000 (22:33 +0200)] 
WPS: Read HTTP request within HTTP server code

This removes HTTP related code from wps_upnp_web.c and makes it easier
to use HTTP server functionality for new uses (e.g., WPS ER).

14 years agoWPS: Add HTTP server module
Jouni Malinen [Sun, 8 Nov 2009 15:26:55 +0000 (17:26 +0200)] 
WPS: Add HTTP server module

Clean up code so that UPnP implementation does not need to include all
the HTTP functionality. In addition, make it easier to share HTTP server
functionality with other components in the future.

14 years agoWPS ER: Fetch and parse device description
Jouni Malinen [Sun, 8 Nov 2009 14:46:03 +0000 (16:46 +0200)] 
WPS ER: Fetch and parse device description

14 years agoWPS: Move generic UPnP XML helper functionality into a separate file
Jouni Malinen [Sun, 8 Nov 2009 12:06:01 +0000 (14:06 +0200)] 
WPS: Move generic UPnP XML helper functionality into a separate file

14 years agoWPS: Add HTTP client module to clean up code
Jouni Malinen [Sun, 8 Nov 2009 10:35:37 +0000 (12:35 +0200)] 
WPS: Add HTTP client module to clean up code

Instead of implementing HTTP client functionality inside
wps_upnp_event.c, use a generic HTTP client module to do this. The HTTP
client code can now be shared more easily for other purposes, too.

14 years agoWPS: Mark functions static
Jouni Malinen [Sat, 7 Nov 2009 15:04:19 +0000 (17:04 +0200)] 
WPS: Mark functions static

These functions are used only within wps_upnp_event.c.

14 years agoWPS: Add initial part of External Registrar functionality
Jouni Malinen [Sat, 7 Nov 2009 10:41:01 +0000 (12:41 +0200)] 
WPS: Add initial part of External Registrar functionality

This is the first step in adding support for using wpa_supplicant as a
WPS External Registrar to manage APs over UPnP. Only the device
discovery part is implemented in this commit.