Commit graph

62 commits

Author SHA1 Message Date
Jouni Malinen
1cea09a9e2 WPS ER: Add support for building NFC configuration token
WPS_ER_NFC_CONFIG_TOKEN command can now be used to build a NFC
configuration token based on AP Settings learnt with WPS_ER_LEARN
or set with WPS_ER_CONFIG.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-06-28 16:35:51 +03:00
Jouni Malinen
0f3d578efc Remove the GPL notification from files contributed by Jouni Malinen
Remove the GPL notification text from the files that were
initially contributed by myself.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-11 19:39:36 +02:00
Jouni Malinen
ae9c400358 WPS ER: Fix UPnP XML Device Description parser to find correct device
The device description file may include multiple devices. Improve the
simplistic parser by first trying to find the WFADevice:1 device before
fetching the device parameters. While this is still far from complete
XML parsing, this should address the most common root device
specifications.
2011-08-31 13:56:03 +03:00
Jouni Malinen
d601247ca9 P2P: Allow WPS_PBC command on GO to select on P2P Device Address
An optional parameter, p2p_dev_addr, can now be given to WPS_PBC
command on P2P GO to indicate that only the P2P device with the
specified P2P Device Address is allowed to connect using PBC. If
any other device tries to use PBC, a session overlap is indicated
and the negotiation is rejected with M2D. The command format for
specifying the address is "WPS_PBC p2p_dev_addr=<address>", e.g.,
WPS_PBC p2p_dev_addr=02:03:04:05:06:07

In addition, show the PBC session overlap indication as a WPS failure
event on an AP/GO interface. This particular new case shows up as
"WPS-FAIL msg=4 config_error=12".
2011-02-07 18:28:36 +02:00
Jouni Malinen
c17b1e274f WPS ER: Fix compiler warning on non-WPS2 builds 2010-11-11 14:54:18 +02:00
Jouni Malinen
07fef399a1 WPS ER: Clear WPS state if PutMessage does not include NewOutMessage
This is needed to avoid getting stuck with pending WPS operation, e.g.,
when an AP replies to WSC_NACK with HTTP OK, but without following
message.
2010-11-02 11:20:54 +02:00
Jouni Malinen
5245483f80 WPS ER: Add validation of WPS attributes in proxied Probe Request
When strict validation is enabled in the build, check the WPS
attributes in proxied Probe Request frames.
2010-10-31 11:57:13 +02:00
Jouni Malinen
be88391dee WPS ER: Cache AP settings for APs that restart UPnP
This is needed to avoid issues with APs that restart their UPnP,
e.g., when ER reconfigures them. The previously known settings are
now cached and taken into use if an AP is detected to leave
(ssdp:byebye) and then return.
2010-10-25 22:22:07 +03:00
Jouni Malinen
ed159ad41b WPS ER: Add more details to wps_er_pbc failure returns
Indicate the reason for the failure when wps_er_pbc is rejected.
2010-10-25 21:59:25 +03:00
Jouni Malinen
669f322d0e WPS ER: Fix SetSelectedRegistrar to include wildcard AuthorizedMACs
This is required by WPS 2.0, so add the wildcard address to
AuthorizedMACs if no addresses are in the list.
2010-10-25 21:45:29 +03:00
Jouni Malinen
20ebd9c4b9 WPS ER: Only activate PBC mode on single AP
Verify that the UUID given to wps_er_pbc command is known and only
activate PBC mode on the matching AP. The UUID can be that of the
AP or the station/Enrollee.
2010-10-25 21:41:10 +03:00
Jouni Malinen
3e7533b399 WPS ER: Show SetSelectedRegistrar events as ctrl_iface events
This makes it easier to figure out if something goes wrong in
preparing the AP for enrolling a station.
2010-10-25 21:29:22 +03:00
Jouni Malinen
ef10f4733f WPS ER: Add wps_er_set_config to use local configuration
This command can be used to enroll a network based on a local
network configuration block instead of having to (re-)learn the
current AP settings with wps_er_learn.
2010-10-20 13:37:01 +03:00
Jouni Malinen
6d1031b971 WPS ER: Add more debug info on initialization errors 2010-09-24 16:05:58 -07:00
Jouni Malinen
a9d69254e3 WPS ER: Make sure PIN timeout does not interrupt PBC operation
We need to clear the selected registrar timeout from wps_er_learn
when stopping the protocol run at M7 (previously, this was done only
when WSC_Done was being processed). In addition, we need to cancel
the timeout when a new PBC operation is started.
2010-09-23 14:45:55 -07:00
Jouni Malinen
2d5e0d78e9 WPS ER: Fix debug message for protocol run done case
This is not a failure and should not be indicated as such in the
debug log.
2010-09-22 19:19:33 -07:00
Jouni Malinen
2d509b39b1 WPS: Fix ER PBC overlap detection build with P2P changes 2010-09-09 07:17:21 -07:00
Jouni Malinen
fdc9eeb175 WPS 2.0: Convert new attributes into WFA vendor extension
The WSC 2.0 specification moved to use another design for the new
attributes to avoid backwards compatibility issues with some
deployed implementations.
2010-09-09 06:07:49 -07:00
Jouni Malinen
498cdee0c7 WPS ER: Use PBC overlap detection
ER should follow same rules as internal Registrar in an AP for
session overlap detection.
2010-09-09 06:07:49 -07:00
Jouni Malinen
b68ccf4048 WPS ER: Do not use SetSelectedRegistrar when learning/configuring AP 2010-09-09 06:07:49 -07:00
Jouni Malinen
53587ec183 WPS 2.0: Make WSC 2.0 support to be build option (CONFIG_WPS2)
For now, the default build will only include WSC 1.0 support.
CONFIG_WPS2=y can be used to add support for WSC 2.0.
2010-09-09 06:07:48 -07:00
Jouni Malinen
31fcea931d WPS 2.0: Add support for AuthorizedMACs attribute
Advertize list of authorized enrollee MAC addresses in Beacon and
Probe Response frames and use these when selecting the AP. In order
to provide the list, the enrollee MAC address should be specified
whenever adding a new PIN. In addition, add UUID-R into
SetSelectedRegistrar action to make it potentially easier for an AP
to figure out which ER sent the action should there be multiple ERs
using the same IP address.
2010-09-09 06:07:47 -07:00
Jouni Malinen
f439079e93 WPS 2.0: Add new attributes and update version negotiation
This adds definitions and parsing of the new attributes that were added
in WPS 2.0. In addition, the version negotiation is updated to use the
new mechanism, i.e., accept everything received and use the new Version2
attribute in transmitted messages.
2010-09-09 06:07:47 -07:00
Jouni Malinen
08b19cb404 WPS: Limit WPS ER event_id < 2^31 bits to avoid issues with atoi()
Previously, large event_id values (> 2^31) resulted in integer
overflow that would make ER drop all events from the AP.
2010-07-20 22:56:58 -07: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
68fd595fa5 WPS ER: Check uuid_str2bin() return value 2010-01-10 22:12:55 +02:00
Jouni Malinen
4f6050e796 WPS ER: Verify os_get_random() return value 2010-01-10 22:08:43 +02:00
Jouni Malinen
612162430f WPS: Remove unused mac_addr_text parameter from get_netif_info() 2010-01-09 16:57:15 +02:00
Jouni Malinen
1a1bf008cb WPS ER: Delay wpa_supplicant termination to allow unsubscription
Instead of forcefully deinitializing ER immediately, give it some
time to complete unsubscription and call eloop_terminate() only once
ER code has completed its work.
2009-12-19 23:47:54 +02:00
Jouni Malinen
e46338fc76 WPS ER: Unsubscribe from AP events whenever removing the AP entry
Store the subscription identifier during subscription process and use
this to unsubscribe from events when removing the AP.
2009-12-19 23:20:22 +02:00
Jouni Malinen
96f5234735 WPS ER: Convert lists to use struct dl_list 2009-12-19 22:14:06 +02:00
Jouni Malinen
11ff95783e 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.
2009-11-21 18:39:12 +02:00
Jouni Malinen
a34a330706 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.
2009-11-21 18:15:37 +02:00
Jouni Malinen
ec72bd0c77 WPS ER: Move SSDP functionality into a separate file 2009-11-21 17:26:23 +02:00
Jouni Malinen
e694b34474 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.
2009-11-21 13:34:23 +02:00
Jouni Malinen
c3016248f4 WPS ER: Fetch AP's M1 to learn device type and WPS state 2009-11-21 13:13:02 +02:00
Jouni Malinen
52a45d20dd WPS ER: Use (addr,UUID) as the key for AP entries
This allows multiple WPS AP instances to be supported per IP address.
2009-11-21 12:51:40 +02:00
Jouni Malinen
7a082a83f0 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.
2009-11-21 12:18:24 +02:00
Jouni Malinen
6a1e492a81 WPS ER: Move STA entry unlinking into a separate function 2009-11-21 12:18:03 +02:00
Jouni Malinen
7c04d5ec6c 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.
2009-11-21 12:12:49 +02:00
Jouni Malinen
b3f371cabf 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.
2009-11-20 21:57:30 +02:00
Jouni Malinen
7c009db2a6 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.
2009-11-20 21:56:39 +02:00
Jouni Malinen
33417cd75c WPS ER: Clear WPS protocol run on PutMessage failure 2009-11-15 22:56:39 +02:00
Jouni Malinen
2c073ad43d WPS ER: Deinit WPS protocol data when freeing AP entry 2009-11-15 22:53:10 +02:00
Jouni Malinen
cef4652f2c WPS ER: Use learnt AP settings to build credentials for an Enrollee 2009-11-15 22:46:30 +02:00
Jouni Malinen
e64dcfd54b WPS ER: Add command for fetching current AP settings 2009-11-15 22:27:06 +02:00
Jouni Malinen
f6d23cfd9e 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.
2009-11-15 18:54:37 +02:00