dbus getAll let you to download information of any interface. Each
interface has a reference number inside the wpa_supplicant. In my laptop
my wifi is interface 1. In order to ready wifi interface information I
can use dbus as shown in this example:

sudo dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
/fi/w1/wpa_supplicant1/Interfaces/1
org.freedesktop.DBus.Properties.GetAll
string:fi.w1.wpa_supplicant1.Interface

The result of the command give you the an answer like:

sudo dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1 
/fi/w1/wpa_supplicant1/Interfaces/1 org.freedesktop.DBus.Properties.GetAll 
string:fi.w1.wpa_supplicant1.Interface
[sudo] password for michael: 
method return time=1603398113.528196 sender=:1.4 -> destination=:1.267 
serial=476 reply_serial=2
   array [
      dict entry(
         string "Capabilities"
         variant             array [
               dict entry(
                  string "Pairwise"
                  variant                      array [
                        string "ccmp"
                        string "tkip"
                     ]
               )
               dict entry(
                  string "Group"
                  variant                      array [
                        string "ccmp"
                        string "tkip"
                        string "wep104"
                        string "wep40"
                     ]
               )
               dict entry(
                  string "GroupMgmt"
                  variant                      array [
                        string "aes-128-cmac"
                     ]
               )
               dict entry(
                  string "KeyMgmt"
                  variant                      array [
                        string "none"
                        string "ieee8021x"
                        string "wpa-eap"
                        string "wpa-ft-eap"
                        string "wpa-eap-sha256"
                        string "wpa-psk"
                        string "wpa-ft-psk"
                        string "wpa-psk-sha256"
                        string "wps"
                     ]
...

If one of the value can not reported the entire request just plain fail.
This is not happen on the same version without any addition patch. In
the debian package was added a patch to report the Stations attribue
that is a part of this answer and the fact that this is only valid on ap
mode does not let reply at all of this message. Now in connman for
example this getAll is used to get out the interface information as you
can find in this snipped code:


int supplicant_dbus_property_get_all(const char *path, const char *interface,
                                supplicant_dbus_property_function function,
                                void *user_data, gpointer caller)
{
        struct property_call_data *property_call = NULL;
        DBusMessage *message;
        DBusPendingCall *call;

        if (!connection)
                return -EINVAL;

        if (!path || !interface)
                return -EINVAL;

        property_call = g_try_new0(struct property_call_data, 1);
        if (!property_call)
                return -ENOMEM;

        message = dbus_message_new_method_call(SUPPLICANT_SERVICE, path,
                                        DBUS_INTERFACE_PROPERTIES, "GetAll");
        if (!message) {
                g_free(property_call);
                return -ENOMEM;
        }
...


static void interface_added(DBusMessageIter *iter, void *user_data)
{
...
       if (!properties_appended) {
                supplicant_dbus_property_get_all(path,
                                                SUPPLICANT_INTERFACE 
".Interface", << this call fail
                                                interface_property, interface,
                                                interface);
                return;
        }

...


This break all the other call try to access the Interface object in dbus 
dictionary

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1899262

Title:
  Broken dbus GetAll message to wpa supplicant interface properties

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/wpa/+bug/1899262/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to