Hi Martin, > Below patch can be used to partly resolve bug > 750(https://bugzilla.moblin.org/show_bug.cgi?id=750) > On open system, STA can associate to AP without any authentication. So when > key is changed at AP side, it still can be associated but dhclient will fail. > Below patch will disconnect the network(release dhclient and disassociate AP) > when dhclient failed. > So user/UI can know that the AP can not be connected. He can reset the > passphase or connect to other network. > Any comments are welcome. > > To the other case, > When the encryption mode is changed, I think it should be the new network, so > the old network will not be selected, that can be used to resolve the > encryption mode change case. I think it should involve with the profile work, > I will work on it later. > > > diff --git a/include/network.h b/include/network.h > index 78e5c0e..15409bd 100644 > --- a/include/network.h > +++ b/include/network.h > @@ -80,6 +80,8 @@ extern connman_bool_t connman_network_get_remember(struct > connman_network *netwo > > extern int connman_network_connect(struct connman_network *network); > > +extern int connman_network_disconnect(struct connman_network *network); > + > extern int connman_network_set_string(struct connman_network *network, > const char *key, const char *value); > extern const char *connman_network_get_string(struct connman_network > *network, > diff --git a/plugins/dhclient.c b/plugins/dhclient.c > index 7e5e6d0..3790960 100644 > --- a/plugins/dhclient.c > +++ b/plugins/dhclient.c > @@ -44,6 +44,7 @@ struct dhclient_task { > GPid pid; > int ifindex; > gchar *ifname; > + struct connman_network *network; > struct connman_element *element; > }; > > @@ -147,6 +148,7 @@ static int dhclient_probe(struct connman_element *element) > task->ifindex = element->index; > task->ifname = inet_index2name(element->index); > task->element = element; > + task->network = element->parent->network;
this will not work. In case of Ethernet the parent is a struct connman_device. The rest looks good, but we have to be careful to make this generic and not a WiFi only thing. Regards Marcel _______________________________________________ connman mailing list [email protected] https://lists.moblin.org/mailman/listinfo/connman
