Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: [PATCH] supplicant: fixed return value of ssid getter
(Vasyl Vavrychuk)
----------------------------------------------------------------------
Message: 1
Date: Sat, 24 Feb 2018 18:29:52 +0200
From: Vasyl Vavrychuk <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] supplicant: fixed return value of ssid getter
Message-ID:
<CAGj4m+4X-rKFsfWfWGyGEmY2dz0fA8YzWCvb1HnKQCNCDS=o...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
By previously I mean before my commit.
Without my commit for hidden networks g_supplicant_network_get_ssid
returns ssid_len=0 and as a return value the pointer to the empty
string.
In network_added this return value is assigned to variable ssid
ssid = g_supplicant_network_get_ssid(supplicant_network, &ssid_len);
and later in network_added this pointer is checked for not NULL
if (ssid)
connman_network_set_group(network, group);
if (wifi->hidden && ssid) {
...
}
what is the point of checking for not NULL if it is always not NULL?
Another thing is that connman_network_set_blob(network, "WiFi.SSID",
ssid="", ssid_len=0); will set network->wifi.ssid=NULL.
Then as result of the call chain network_added >
connman_network_set_group > network_probe >
__connman_service_create_from_network > service_register >
__connman_config_provision_service > find_and_provision_service >
find_and_provision_service_from_config > try_provision_service we get
"Network SSID not set" warning.
On Sat, Feb 24, 2018 at 4:22 PM, Daniel Wagner <[email protected]> wrote:
> Hi Vasyl,
>
> On 02/23/2018 09:26 PM, Vasyl Vavrychuk wrote:
>> Previously for network without SSID g_supplicant_network_get_ssid
>> returned pointer to empty string. Then some naive users of it treated
>> such value as a valid SSID.
>>
>> This fixes "Network SSID is not set" for hidden networks.
>
> Can you elaborate a bit what is wrong? I tried to understand what you
> mean with 'previously'. Does a newer version of wpa_s behave
> differently compared to an older version?
>
> Also I found following commit:
>
> commit 91913c40054d9c55c6d38f0c626a78bdbcf4279a
> Author: Tomasz Bursztyka <[email protected]>
> Date: Thu Dec 12 15:57:05 2013 +0200
>
> gsupplicant: A network ssid of length 0 is valid, it's an hidden one
>
> In case of an hidden AP around, its ssid has a length of 0, but it is
> obviously a valid network anyway.
>
> Fixes such regression from commit 363393cfb1a5f95f8892f40662486c87b80d0091
>
> Reported by Sameer Naik
>
> diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
> index 23ea41a03642..559dfbc6fd2f 100644
> --- a/gsupplicant/supplicant.c
> +++ b/gsupplicant/supplicant.c
> @@ -853,7 +853,7 @@ const char
> *g_supplicant_network_get_security(GSupplicantNetwork *network)
> const void *g_supplicant_network_get_ssid(GSupplicantNetwork *network,
> unsigned int *ssid_len)
> {
> - if (!network || network->ssid_len == 0) {
> + if (!network) {
> *ssid_len = 0;
> return NULL;
> }
>
>
> The report from Sameer was
>
> """
> I am looking into the connman plugin/wifi.c to figure out the issue.
> so far i have found that in scan_callback_hidden function,
> g_supplicant_interface_get_max_scan_ssids(wifi->interface), returns 0 and
> therefore no attempt to connect to provisioned hidden wifi networks is
> performed.
>
> Will trace the calls further to figure out why
> g_supplicant_interface_get_max_scan_ssids returns 0.
> """
>
> https://lists.01.org/pipermail/connman/2013-March/014020.html
>
>> ---
>> gsupplicant/supplicant.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
>> index 5246c80b..ec2f4307 100644
>> --- a/gsupplicant/supplicant.c
>> +++ b/gsupplicant/supplicant.c
>> @@ -1189,7 +1189,7 @@ const char
>> *g_supplicant_network_get_security(GSupplicantNetwork *network)
>> const void *g_supplicant_network_get_ssid(GSupplicantNetwork *network,
>> unsigned int *ssid_len)
>> {
>> - if (!network) {
>> + if (!network || !network->ssid_len) {
>> *ssid_len = 0;
>> return NULL;
>> }
>
> Your patch is reverting commit 91913c40054d ("gsupplicant: A network
> ssid of length 0 is valid, it's an hidden one").
>
> Thanks,
> Daniel
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 28, Issue 19
***************************************