]> git.ipfire.org Git - thirdparty/hostap.git/commit
dbus: Redirect signal processing to the management device if present
authorVasyl Vavrychuk <vvavrychuk@gmail.com>
Mon, 12 Feb 2018 19:27:20 +0000 (21:27 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 2 Apr 2018 09:02:13 +0000 (12:02 +0300)
commitd53401c54bd4148d1336cafffbc9752cf2ee5b71
tree57d24fd8ee1d1ffc664e7d9179cca0a494c282ea
parente4802127650aafd187c7e4790360e6970135de3f
dbus: Redirect signal processing to the management device if present

This fixes sending of FindStopped, GroupFormationFailure, and
InvitationReceived signals in the case of separate P2P-Device interface.
This extends the coverage of the earlier commit
745d62322b37675b4a7eb8f0cd10e25a288168da ("dbus: Redirect P2P request to
the managment device if present") to these three functions that were
missing the redirection.

Some wireless controllers might have separate P2P-Device interface, see
as example result of 'iw dev':

phy#0
        Unnamed/non-netdev interface
                ...
                type P2P-device
                ...
        Interface wlp2s0
                type managed
                ...

In this case there is separate 'struct wpa_supplicant' created for this
p2p-dev-* device as result of 'wpa_supplicant_add_iface >
wpas_p2p_add_p2pdev_interface > wpa_supplicant_add_iface'.

This instance of wpa_supplicant is not registered in D-Bus
(wpas_dbus_register_*) since for corresponding P2P device interface flag
'struct wpa_interface > p2p_mgmt' is set.

But this instance is saved in p2p_init_wpa_s and is used for handling
P2P related D-Bus commands. Therefore we should look for D-Bus path in
the parent of p2p_init_wpa_s instance.

Without this change test dbus_p2p_discovery starts failing if we set
support_p2p_device in vm-run.sh.

Signed-off-by: Vasyl Vavrychuk <vvavrychuk@gmail.com>
wpa_supplicant/dbus/dbus_new.c