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. [PATCH] Fix gsupplicant not to fail an active scan on
      wpa_supplicant side (????????? ?????)


----------------------------------------------------------------------

Message: 1
Date: Tue, 20 Nov 2018 14:28:46 -0800
From: ????????? ?????  <[email protected]>
To: [email protected]
Subject: [PATCH] Fix gsupplicant not to fail an active scan on
        wpa_supplicant side
Message-ID:
        <CALMby5YNbBwtN-aknRWNRQ8HDWQ_tgefNY=xerbv3okthlf...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

he issue has been discovered during work on other issue
https://lists.01.org/pipermail/connman/2018-November/023085.html

If connman does ACTIVE scan without adding a list of SSIDs
 interface_scan_params() in gsupplicant/supplicant.c calls

supplicant_dbus_dict_append_array(&dict, "SSIDs",
DBUS_TYPE_STRING,
append_ssids,
data->scan_params);

which creates an empty entry for "SSIDs" without anything inside.

This dbus msg goes to wpa supplicant to dbus/dbus_new_handles.c  to
wpas_dbus_handler_scan() which calls wpas_dbus_get_scan_ssids() because
there is an entry "SSIDs".
Unfortunately wpas_dbus_get_scan_ssids() fails with an error.

Here are my logs:

Nov 17 03:09:10 LogiCircle daemon.debug wpa_supplicant[344]:
wpas_dbus_get_scan_ssids[dbus]: ssids must be an array of arrays of bytes
Nov 17 03:09:10 LogiCircle daemon.debug wpa_supplicant[344]:
wpas_dbus_get_scan_ssids[dbus]: ssids must be an array of arrays of bytes
Nov 17 03:09:10 LogiCircle daemon.debug wpa_supplicant[344]:
wpas_dbus_get_scan_ssids[dbus]: ssids must be an array of arrays of bytes
Nov 17 03:17:06 LogiCircle daemon.debug wpa_supplicant[344]:
wpas_dbus_get_scan_ssids[dbus]: ssids must be an array of arrays of bytes
Nov 17 03:17:06 LogiCircle daemon.debug wpa_supplicant[344]:
wpas_dbus_get_scan_ssids[dbus]: ssids must be an array of arrays of bytes
Nov 17 03:17:06 LogiCircle daemon.debug wpa_supplicant[344]:
wpas_dbus_get_scan_ssids[dbus]: ssids must be an array of arrays of bytes

The patch below is very simple. If there is no SSID in scan_parameters do
not create "SSIDs". The adjacent function supplicant_add_scan_frequency()
does such verification and does not create any empty "Channels".


==============================
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 0cb621b9..92941c63 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -4241,11 +4241,13 @@ static void interface_scan_params(DBusMessageIter
*iter, void *user_data)
  supplicant_dbus_dict_append_basic(&dict, "Type",
  DBUS_TYPE_STRING, &type);

- supplicant_dbus_dict_append_array(&dict, "SSIDs",
- DBUS_TYPE_STRING,
- append_ssids,
- data->scan_params);

+ if (data->scan_params->ssids) {
+ supplicant_dbus_dict_append_array(&dict, "SSIDs",
+ DBUS_TYPE_STRING,
+ append_ssids,
+ data->scan_params);
+ }
  supplicant_add_scan_frequency(&dict, add_scan_frequencies,
  data->scan_params);
  } else

PS. I sent this patch from other unregistered email. I hope there is not
going to be any duplicate.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.01.org/pipermail/connman/attachments/20181120/b2fd752a/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 37, Issue 9
**************************************

Reply via email to