summaryrefslogtreecommitdiff
path: root/gsupplicant
AgeCommit message (Collapse)AuthorFilesLines
2014-07-17Imported Upstream version 1.24upstream/1.24Zhang zhengguang4-368/+885
2013-05-17wifi: Scan all stored hidden networksTomasz Bursztyka2-1/+2
Previously the number of scanned hidden WiFi networks was restricted by the fast scan limit of the WiFi driver. This patch takes into account the driver fast scan limit and will scan for all configured hidden WiFi networks. Thanks to Jukka for testing this.
2013-02-26gsupplicant: Increase D-Bus timeout to 30 secondsPatrik Flykt1-1/+1
2013-02-25gsupplicant: Remove pointless timeout constantMarcel Holtmann1-2/+0
2013-02-22gsupplicant: Set the scan callback in g_supplicant_interface_scanJulien Massot1-0/+3
The callback is required to properly handle scanning errors reported by wpa_supplicant through the scan_done signal. Steps to reproduce: 1. Set a country code to the WiFi card which have more frequencies allowed than the world roaming allow. 2. Connect to a WiFi network not available in the world roaming setup. 3. Stop connman. 4. Change the country code to 00, be sure the frequencies use in step 2. is no longer allowed. Take care of cfg80211 authorize frequencies when beacons are received, I prefer using mac80211_hwsim from here to avoid side effects about beacon reception. 5. Start connman again. Now ConnMan is stuck in scanning state as the scan_fast method of plugins/wifi.c is called with a forbidden frequency. wpa_supplicant returns an error received in "gsupplicant/supplicant.c: signal_scan_done", where the code enters 'if (success == FALSE)' but unfortunately scan_callback is NULL at this point as the scan_callback is normally set in interface_scan_result().
2013-02-18gsupplicant: Return zero for max scan SSID parameterPatrik Flykt1-2/+2
A driver can return a valid max scan SSID value of zero. Thus no fast scans can be done, so the code falls back to a simple scan instead. A value of zero is properly handled in plugins/wifi.c. An active scan for a hidden SSID adds only the SSID parameter to the wpa_supplicant D-Bus method call, which wpa_supplicant then handles properly. Some drivers also report a max scan SSID value of one. In some of the cases that value is bogus, the driver will not be able to do a fast scan anyway. In addition, it is questionable why only one SSID can be fast scanned as the feature would not differ much from an active scan for a hidden network. Thus we set the limit to two, i.e. zero or one is treated as zero, two or more is reported as is. Thanks to Grant Erickson and Tomasz Bursztyka for finding and pinpointing this issue. Fixes BMC#25971
2013-01-11gsupplicant: Return max SSIDs to scan given by wpa_supplicantPatrik Flykt2-12/+2
Although it seems wpa_supplicant can handle 4 SSIDs in version 0.7.x and 16 starting with 0.8.x, in practise this does not work. Return the value reported without relying on wpa_supplicant internals to handle the situation. In order for hidden scans to work properly, the minimum value needs to be 1.
2012-11-13supplicant: Handle race condition on WiFi dongle removalPatrik Flykt1-4/+21
When a WiFi USB dongle is removed, both rtnl and wpa_supplicant will be telling that the device is gone. While disconnecting and removing an interface via gsupplicant, check that D-Bus doesn't give us an error indicating the interface is already unregistered from D-Bus. The gdb output looks like: (gdb) where #0 0x0042247c in network_connect (network=0x2) at plugins/wifi.c:1197 #1 0x004228f0 in disconnect_callback (result=<value optimized out>, interface=0x0, user_data=0x99) at plugins/wifi.c:1254 #2 0x0042b910 in network_remove_result (error=0x4d5458 "org.freedesktop.DBus.Error.UnknownMethod", iter=<value optimized out>, user_data=<value optimized out>) at gsupplicant/supplicant.c:3593 #3 0x0042ede0 in method_call_reply (call=0x4c6fd0, user_data=0x4d3be8) at gsupplicant/dbus.c:386 #4 0x2abfddb4 in complete_pending_call_and_unlock () from /usr/lib/libdbus-1.so.3 Also don't call the same callback twice.
2012-10-16gsupplicant: Send -ENOLINK error on scan reply if interface was not readyTomasz Bursztyka1-1/+9
2012-10-16gsupplicant: Add a new state according to 'interface_disabled'Tomasz Bursztyka2-1/+8
When soft rfkill is on, wpa_supplicant sets the interface disabled and sends a state named 'interface_disabled'. Taking this information into account fixes the following issue: - disable wifi (user setting) and hard rfkill it - then un-hard rfkill it, whereafter rfkill states (soft/hard) will go like this: * from 1/1 to 0/0 * from 0/0 to 1/0 when 0/0 occurs, connman will request to enable wifi The problem with this is that enabling wifi takes quite some time and in between ConnMan will soft block wifi to disable it (according to previous user setting). Thus it will request to disable wifi but since enabling is still going on, this request won't do anything. Meanwhile wpa_supplicant will also catch the soft rfkill event and wpa_supplicant will set the state to 'interface_disabled', but since it's not handled properly by ConnMan, the wifi_enable() callback will be called and the function will assume wifi got enabled.
2012-07-15gsupplicant: Avoid shadowing key variableMarcel Holtmann1-4/+5
2012-07-05gsupplicant: Add a function to handle autoscan methodTomasz Bursztyka2-0/+64
2012-07-05gsupplicant: Add a method to set interface's country propertyTomasz Bursztyka2-0/+26
2012-07-05gsupplicant: Adapt set country callback to return a resultTomasz Bursztyka2-11/+12
This is necessary for the next coming patches, to fix country setting by interface
2012-06-18supplicant: Call scan callback if needed when removing interfacePatrik Flykt1-0/+15
Check whether a scan callback is set for the interface when an interface removed signal is received from wpa_supplicant. wpa_supplicant seems not to reply to any outstanding scan method calls after a wpa_supplicant 'RemoveInterface' has been received.
2012-06-11gsupplicant: Properly handle WPS properties updateTomasz Bursztyka1-7/+9
2012-06-11gsupplicant: Properly handle WiFi security changeTomasz Bursztyka1-29/+70
Handle RSN and WPA security separately and combine the results.
2012-05-16gsupplicant: Coding style clean-upGrant Erickson1-12/+14
This resolves several post-commit review coding style comments for raw PSK support.
2012-05-15gsupplicant: Avoid critical errorsJukka Rissanen1-1/+1
wpa_supplicant sends error if wlan interface cannot be created. Do not treat this error as critical because after calling g_critical() the program logging will be disabled.
2012-05-15gsupplicant: fix "raw" PSK supportGrant Erickson1-6/+36
This fixes "raw" PSK support by first converting the "raw" PSK from a 64-character hexadecimal string to 32-byte array before appending it to the network dictionary.
2012-05-09gsupplicant: Remove dead assignmentHenrique Dante de Almeida1-1/+0
2012-05-08gsupplicant: Use the right dbus helper when adding a fixed array in a dictTomasz Bursztyka1-2/+1
Fixes BMC#25120
2012-05-08gsupplicant: Fixing a possible memory leak when disconnectingTomasz Bursztyka1-1/+3
2012-05-04wifi: Allow max number of scan entriesJukka Rissanen2-14/+36
Do no limit the scan entries to 4 (G_SUPPLICANT_MAX_FAST_SCAN) but use the limit given by the driver. The limit is given by wpa_s. If the supplicant does not return the limit, then use 4 as a max value.
2012-04-28gsupplicant: Update copyright informationMarcel Holtmann4-4/+4
2012-04-28gssuplicant: Fix when a bss should be added or replaced in a networkTomasz Bursztyka1-6/+41
Note: on wpa_supplivant 0.7.x this fixes bug 21332 _only_ when switching from wep to psk, not the other way round due to wpa_supplicant not telling about RSN/WPA fields being empty. This could be fixed in parsing IE every time it is updated, if wpa_s signals it. It work properly on wpa_supplicant 0.8.x and 1.x since signaling RSN/WPA changes has been fixed. Fixes BMC#21332
2012-04-28gsupplicant: Added more debugging messages when adding or replacing a networkTomasz Bursztyka1-0/+6
2012-04-28gsupplicant: Creating an helper function to compute bss securityTomasz Bursztyka1-8/+14
2012-04-28gsupplicant: Renaming a function for a more relevant nameTomasz Bursztyka1-2/+2
2012-04-23gsupplicant: Add WPS specific capabilities handling for networkTomasz Bursztyka2-1/+41
2012-04-23gsupplicant: Add WPS specific capabilities parsing for BSSTomasz Bursztyka2-4/+38
2012-04-17supplicant: Remove trailing whitespaceJulien Massot1-1/+1
2012-04-17gsupplicant: Interpret "invalid message format" as invalid-key errorJulien Massot1-2/+7
If gsupplicant sends a malformed passphrase, wpa_supplicant return an error "invalid message format", parsing this error avoids future usage of this passphrase.
2012-02-24gsupplicant: Add support for background scanning parametersTomasz Bursztyka2-0/+5
2011-12-23supplicant: Make create_name() UTF-8 awareDaniel Wagner1-13/+31
Create proper UTF-8 encoded names from SSIDs. Invalid sequneces will be replaced by replacement characters. This function is based on the _g_utf8_make_valid() from glib.
2011-11-29wifi: Set device powered from the interface create callbackSamuel Ortiz2-0/+9
As interface_added can potentially show up before the interface creation callback, the device powered flag can be set from the latter.
2011-11-07gsupplicant: Add a function to enable or disable the selected networkTomasz Bursztyka2-0/+26
2011-09-13wifi: Add SSIDs and frequencies to wpa_supplicant scan for fast scanMohamed Abbas2-5/+146
Lot of fixes by Jukka Rissanen <jukka.rissanen@linux.intel.com>
2011-09-13gsupplicant: Get the number of scan ssids from supplicantMohamed Abbas2-1/+19
2011-09-13gsupplicant: Add support to append char ** entries to dbus dictMohamed Abbas2-0/+54
2011-09-13service: Add frequency support to serviceMohamed Abbas2-0/+11
Get the frequncy of gsupplicant network on connman network creation, and always save the frequency of the wifi service.
2011-09-12gsupplicant: Implement network properties changes notificationSamuel Ortiz2-0/+17
This is only used for propagatong signal changes for now.
2011-09-12gsupplicant: Track best signal and the corresponding BSSSamuel Ortiz1-15/+66
2011-09-12gsupplicant: Do not access IE array past end of bufferJukka Rissanen1-1/+3
IE list was traversed past buffer limit in the last round.
2011-07-21gsupplicant: set the cipher even if security is WEPJulien Massot1-0/+1
This patch fix an issue with WEP40, i tested it with WEP40 WEP104 and open AP. It set the group cipher even if security is WEP otherwise connman won't connect to WEP40 service.
2011-06-17gsupplicant: Client certificate is not mandatory for TTLS/PEAPPaolo Pellegrino1-5/+3
2011-06-14gsupplicant: Fix how raw key as psk are provided.Tomasz Bursztyka1-2/+26
2011-02-07gsupplicant: Report AddNetwork and SelectNetwork errors to callerPatrik Flykt1-2/+28
Call interface_connect_data callback when an error is reported for wpa_supplicant AddNetwork and SelectNetwork method calls. In the case of WPA-PSK or WEP key being incorrectly formatted, set the callback result to -ENOKEY.
2011-02-02gsupplicant: Add ciphers only for WPA PSK and EAPSamuel Ortiz1-2/+2
2011-02-02gsupplicant: Set WPA protocolSamuel Ortiz2-0/+39