ethernet: Create the bridge before to add an interface to it.
authorGuillaume Lucas <guillaumex.lucas@intel.com>
Fri, 4 Feb 2011 08:04:07 +0000 (08:04 +0000)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 4 Feb 2011 10:37:27 +0000 (11:37 +0100)
The bridge is created by the connman_technology_tethering_notify()
function. So this function must be called before to add an interface
to the bridge. Means before the call to connman_inet_add_to_bridge().

plugins/ethernet.c

index 50442fc..2ccd498 100644 (file)
@@ -234,11 +234,11 @@ static void enable_tethering(struct connman_technology *technology,
        for (list = cdc_interface_list; list; list = list->next) {
                int index = GPOINTER_TO_INT(list->data);
 
+               connman_technology_tethering_notify(technology, TRUE);
+
                connman_inet_ifup(index);
 
                connman_inet_add_to_bridge(index, bridge);
-
-               connman_technology_tethering_notify(technology, TRUE);
        }
 }