How to handle multiple SSIDs with the same BSS

Jouni Malinen j
Tue Dec 29 14:10:22 PST 2009


On Tue, Dec 29, 2009 at 01:00:05PM -0800, Marcel Holtmann wrote:
> I never tried running the D-Bus interface together with a pre-configured
> list of networks. Are we still supporting this. Is this a behavior we do
> wanna support?

Most of the time, I'm using a configuration file with networks and don't
see any particular reason to not allow D-Bus API to be enabled at the
same time.

> And I got another crash. It seems to be race condition on startup when
> two clients (one old interface, the other the new one) access the daemon
> and try to bootstrap it.

This is interesting one.. I was not aware how the D-Bus integration was
done, but it looks like both the old and the new interface are sharing
the same connection (dbus_bus_get() return value) and either code can
dispatch new messages to be handled. However, the context pointer
(user_data argument for message_handler callback) is completely
different. This sounds like asking for problems..


> #4  0x000000000042e00d in message_handler (connection=<value optimized out>, 
>     message=<value optimized out>, user_data=<value optimized out>)
>     at dbus/dbus_new_helpers.c:1211

This is in the new D-Bus code..

> #5  0x0000003924c1cbee in _dbus_object_tree_dispatch_and_unlock (tree=0x216d860, 
>     message=0x216e070) at dbus-object-tree.c:856
> #6  0x0000003924c10a1c in dbus_connection_dispatch (connection=0x216dba0)
>     at dbus-connection.c:4485
> #7  0x00000000004292f8 in process_watch (iface=0x216df50, watch=0x216d660, 
>     type=EVENT_TYPE_READ) at dbus/dbus.c:60

.. but it was dispatched through the old one.. With different user_data
value, I would assume.

I'm not familiar enough with libdbus to figure out what would be the
best way of avoiding this. Would it be enough to just make both new and
old code use the same context pointer (say, wpa_s)? Or would we need to
add a common message_handler() function that libdbus would be called and
we would then select proper context information based on whether this is
for the new or old D-Bus API? Or should we try to somehow force separate
D-Bus connections (if that can even be done) for both implementations?

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list