[PATCH v3 0/2] USB tethering
Hi, Following patch fix issues for USB tethering. Those patches was successfully tested in HW with latest version of connman and latest version of ofono. Patch "Call __connman_technology_add_interface() after rtnl->newlink()" from Martin is no more necessary with those patches. Regards, Guillaume Guillaume Lucas (2): technology: trigger technology creation by new interface ethernet: Create the bridge before to add an interface to it. --- src/technology.c | 154 -- plugins/ethernet.c |4 ++-- 2 files changed, 81 insertions(+), 77 deletions(-) - Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH v3 2/2] ethernet: Create the bridge before to add an interface to it.
From: Guillaume Lucas 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 |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/ethernet.c b/plugins/ethernet.c index 50442fc..2ccd498 100644 --- a/plugins/ethernet.c +++ b/plugins/ethernet.c @@ -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); } } -- 1.7.0.4 - Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH v3 1/2] technology: trigger technology creation by new interface
From: Guillaume Lucas --- src/technology.c | 154 -- 1 files changed, 79 insertions(+), 75 deletions(-) diff --git a/src/technology.c b/src/technology.c index 7d89b2e..5ef3d10 100644 --- a/src/technology.c +++ b/src/technology.c @@ -139,81 +139,6 @@ void connman_technology_driver_unregister(struct connman_technology_driver *driv driver_list = g_slist_remove(driver_list, driver); } -void __connman_technology_add_interface(enum connman_service_type type, - int index, const char *name, const char *ident) -{ - GSList *list; - - switch (type) { - case CONNMAN_SERVICE_TYPE_UNKNOWN: - case CONNMAN_SERVICE_TYPE_SYSTEM: - return; - case CONNMAN_SERVICE_TYPE_ETHERNET: - case CONNMAN_SERVICE_TYPE_WIFI: - case CONNMAN_SERVICE_TYPE_WIMAX: - case CONNMAN_SERVICE_TYPE_BLUETOOTH: - case CONNMAN_SERVICE_TYPE_CELLULAR: - case CONNMAN_SERVICE_TYPE_GPS: - case CONNMAN_SERVICE_TYPE_VPN: - case CONNMAN_SERVICE_TYPE_GADGET: - break; - } - - connman_info("Create interface %s [ %s ]", name, - __connman_service_type2string(type)); - - for (list = technology_list; list; list = list->next) { - struct connman_technology *technology = list->data; - - if (technology->type != type) - continue; - - if (technology->driver == NULL) - continue; - - if (technology->driver->add_interface) - technology->driver->add_interface(technology, - index, name, ident); - } -} - -void __connman_technology_remove_interface(enum connman_service_type type, - int index, const char *name, const char *ident) -{ - GSList *list; - - switch (type) { - case CONNMAN_SERVICE_TYPE_UNKNOWN: - case CONNMAN_SERVICE_TYPE_SYSTEM: - return; - case CONNMAN_SERVICE_TYPE_ETHERNET: - case CONNMAN_SERVICE_TYPE_WIFI: - case CONNMAN_SERVICE_TYPE_WIMAX: - case CONNMAN_SERVICE_TYPE_BLUETOOTH: - case CONNMAN_SERVICE_TYPE_CELLULAR: - case CONNMAN_SERVICE_TYPE_GPS: - case CONNMAN_SERVICE_TYPE_VPN: - case CONNMAN_SERVICE_TYPE_GADGET: - break; - } - - connman_info("Remove interface %s [ %s ]", name, - __connman_service_type2string(type)); - - for (list = technology_list; list; list = list->next) { - struct connman_technology *technology = list->data; - - if (technology->type != type) - continue; - - if (technology->driver == NULL) - continue; - - if (technology->driver->remove_interface) - technology->driver->remove_interface(technology, index); - } -} - static void tethering_changed(struct connman_technology *technology) { connman_bool_t tethering = technology->tethering; @@ -619,6 +544,85 @@ static void technology_put(struct connman_technology *technology) g_free(technology); } +void __connman_technology_add_interface(enum connman_service_type type, + int index, const char *name, const char *ident) +{ + GSList *list; + + switch (type) { + case CONNMAN_SERVICE_TYPE_UNKNOWN: + case CONNMAN_SERVICE_TYPE_SYSTEM: + return; + case CONNMAN_SERVICE_TYPE_ETHERNET: + case CONNMAN_SERVICE_TYPE_WIFI: + case CONNMAN_SERVICE_TYPE_WIMAX: + case CONNMAN_SERVICE_TYPE_BLUETOOTH: + case CONNMAN_SERVICE_TYPE_CELLULAR: + case CONNMAN_SERVICE_TYPE_GPS: + case CONNMAN_SERVICE_TYPE_VPN: + case CONNMAN_SERVICE_TYPE_GADGET: + break; + } + + connman_info("Create interface %s [ %s ]", name, + __connman_service_type2string(type)); + + technology_get(type); + + for (list = technology_list; list; list = list->next) { + struct connman_technology *technology = list->data; + + if (technology->type != type) + continue; + + if (technology->driver == NULL) + continue; + + if (technology->driver->add_interface) + technology->driver->add_interface(technology, + index, name, ident); + } +} + +void __connman_technology_remove_interface(enum connman_service_type type, + int index, const char *name, const char *ident) +{ + GSList *list; + + switch (type) { + case CONNMAN_SERVICE_TYPE_UNKNOWN: + case CONNMAN_SERVICE_TYPE_SYSTEM: + return; + case CONNMAN_S
ConnMan relicensing
Has ConnMan every been relicensed (eg, distributed under a license other than the GPL) and/or does Intel have any plans to relicense ConnMan? Thanks. ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH v3 1/2] technology: trigger technology creation by new interface
Hi Guillaume, On Fri, Feb 4, 2011 at 10:04 AM, Lucas, GuillaumeX < guillaumex.lu...@intel.com> wrote: > From: Guillaume Lucas > > --- > src/technology.c | 154 > -- > 1 files changed, 79 insertions(+), 75 deletions(-) > > diff --git a/src/technology.c b/src/technology.c > index 7d89b2e..5ef3d10 100644 > --- a/src/technology.c > +++ b/src/technology.c > @@ -139,81 +139,6 @@ void connman_technology_driver_unregister(struct > connman_technology_driver *driv > driver_list = g_slist_remove(driver_list, driver); > } > > -void __connman_technology_add_interface(enum connman_service_type type, > - int index, const char *name, const char > *ident) > -{ > - GSList *list; > - > - switch (type) { > - case CONNMAN_SERVICE_TYPE_UNKNOWN: > - case CONNMAN_SERVICE_TYPE_SYSTEM: > - return; > - case CONNMAN_SERVICE_TYPE_ETHERNET: > - case CONNMAN_SERVICE_TYPE_WIFI: > - case CONNMAN_SERVICE_TYPE_WIMAX: > - case CONNMAN_SERVICE_TYPE_BLUETOOTH: > - case CONNMAN_SERVICE_TYPE_CELLULAR: > - case CONNMAN_SERVICE_TYPE_GPS: > - case CONNMAN_SERVICE_TYPE_VPN: > - case CONNMAN_SERVICE_TYPE_GADGET: > - break; > - } > - > - connman_info("Create interface %s [ %s ]", name, > - __connman_service_type2string(type)); > - > - for (list = technology_list; list; list = list->next) { > - struct connman_technology *technology = list->data; > - > - if (technology->type != type) > - continue; > - > - if (technology->driver == NULL) > - continue; > - > - if (technology->driver->add_interface) > - technology->driver->add_interface(technology, > - index, name, > ident); > - } > -} > - > -void __connman_technology_remove_interface(enum connman_service_type type, > - int index, const char *name, const char > *ident) > -{ > - GSList *list; > - > - switch (type) { > - case CONNMAN_SERVICE_TYPE_UNKNOWN: > - case CONNMAN_SERVICE_TYPE_SYSTEM: > - return; > - case CONNMAN_SERVICE_TYPE_ETHERNET: > - case CONNMAN_SERVICE_TYPE_WIFI: > - case CONNMAN_SERVICE_TYPE_WIMAX: > - case CONNMAN_SERVICE_TYPE_BLUETOOTH: > - case CONNMAN_SERVICE_TYPE_CELLULAR: > - case CONNMAN_SERVICE_TYPE_GPS: > - case CONNMAN_SERVICE_TYPE_VPN: > - case CONNMAN_SERVICE_TYPE_GADGET: > - break; > - } > - > - connman_info("Remove interface %s [ %s ]", name, > - __connman_service_type2string(type)); > - > - for (list = technology_list; list; list = list->next) { > - struct connman_technology *technology = list->data; > - > - if (technology->type != type) > - continue; > - > - if (technology->driver == NULL) > - continue; > - > - if (technology->driver->remove_interface) > - technology->driver->remove_interface(technology, > index); > - } > -} > - > static void tethering_changed(struct connman_technology *technology) > { >connman_bool_t tethering = technology->tethering; > @@ -619,6 +544,85 @@ static void technology_put(struct connman_technology > *technology) > g_free(technology); > } > > +void __connman_technology_add_interface(enum connman_service_type type, > + int index, const char *name, const char > *ident) > +{ > + GSList *list; > + > + switch (type) { > + case CONNMAN_SERVICE_TYPE_UNKNOWN: > + case CONNMAN_SERVICE_TYPE_SYSTEM: > + return; > + case CONNMAN_SERVICE_TYPE_ETHERNET: > + case CONNMAN_SERVICE_TYPE_WIFI: > + case CONNMAN_SERVICE_TYPE_WIMAX: > + case CONNMAN_SERVICE_TYPE_BLUETOOTH: > + case CONNMAN_SERVICE_TYPE_CELLULAR: > + case CONNMAN_SERVICE_TYPE_GPS: > + case CONNMAN_SERVICE_TYPE_VPN: > + case CONNMAN_SERVICE_TYPE_GADGET: > + break; > + } > + > + connman_info("Create interface %s [ %s ]", name, > + __connman_service_type2string(type)); > + > + technology_get(type); > Why do we need this ? If its for ref counting, __conman_technology_add_device/ __conman_technology_add_rfkill do that anyway. > + > + for (list = technology_list; list; list = list->next) { > + struct connman_technology *technology = list->data; > + > + if (technology->type != type) > + continue; > + > + if (technology->driver == NULL) > + continue; > + > + if (technology->driver->add_interfa
Re: [RFC] doc: Add EAP login support in Agent API
Hi Samuel, On Thu, 2011-02-03 at 17:13 +0100, Samuel Ortiz wrote: > Hi Henri, > > @@ -97,6 +102,18 @@ Arguments string Type > > Contains the list of alternate field names this > > field can be represented by. > > > > + string Phase2 > > + > > + EAP Phase2 authentication method. For example "gtc", > > + "mschapv2", or "md5". Used to supplement Passphrase > > + field when requesting credentials for 802.1X networks. > This is something I don't want to present to the user. Typically, the user > knows its identity and a passphrase associated to it. So asking for an EAP > passphrase is good enough. > I agree that we don't want to show Phase2 method to the user as such. Instead the reason for it is to enable customization of UI further by having a different dialog for, say, MSCHAPV2 username/password dialog and GTC challenge dialog. I've seen such customizations for example in Nokia N900, where user is asked for "Username" & "Password" in the former case and "Response" in the latter. Maybe instead of the literal phase2 method, additional Passphrase types could be introduced, like "eap-password" and "eap-response"? - Henri ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [RFC 1/2] doc: Add service provisioning method in Manager API
Hi Samuel, On Thu, 2011-02-03 at 18:19 +0100, Samuel Ortiz wrote: > > --- > > doc/manager-api.txt | 16 > > 1 files changed, 16 insertions(+), 0 deletions(-) > > > > diff --git a/doc/manager-api.txt b/doc/manager-api.txt > > index 743ba18..430dec9 100644 > > --- a/doc/manager-api.txt > > +++ b/doc/manager-api.txt > > @@ -117,6 +117,22 @@ Methodsdict GetProperties() > > > > Possible Errors: [service].Error.InvalidArguments > > > > + object ProvisionService(dict properties) > Could you describe the properties ? Wouldn't a string be enough ? Currently the only property is "Configuration", described below. I made this indirection just for the flexibility, so that things like certificates or XML-config could be introduced later as additional properties. > > > > + Provide a configuration for existing services. > > + > > + Configuration property must be provided that contains > > + the actual configuration as a string. It follows the > > + same format as configuration files, see > > + config-format.txt. > I think we talked about an XML file instead. In my opinion XML is overkill, and I'm afraid I wouldn't have time to implement it. String implementation would be easy after sharing some code from src/config.c. - Henri ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [RFC 1/2] doc: Add service provisioning method in Manager API
On Fri, 2011-02-04 at 11:41 +0200, ext Bragge Henri wrote: > > > + same format as configuration files, see > > > + config-format.txt. > > I think we talked about an XML file instead. > > In my opinion XML is overkill, and I'm afraid I wouldn't have time to > implement it. String implementation would be easy after sharing some > code from src/config.c. Um, we had a chat with Marcel on #connman, and he specifically said doc/config-format.txt was supposed to be used. The somewhat longish dicussion ended like this January 18th: (14:29:23) pfl: holtmann: so we can agree on doc/config-format.txt specifying the content of eap configureation, a provisioning tool using connman yet-to-be-done-dbus-api or while that's missing, write the file directly to /var/lib/connman since connman does inotify on the dir? (14:29:34) holtmann: You do wanna build your 802.1x configuration on your PC at home and just import it. (14:30:16) holtmann: pfl: I would go for something like this. One detail would be to be able to include the certificates in the config file. Which we do not support yet. If you want to have another format, I'd suggest going with a (or the above!) DBus API dict containing attribute/value pairs. Simplest to parse, simplest to implement. I would not be too fond of yet another configuration language in XML, as we already have doc/config-format.txt anyway. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH 1/3 v4] Allow to get the service for a location.
Hi Mohamed, On Thu, Feb 03, 2011 at 03:46:27PM -0800, Mohamed Abbas wrote: > Add new function to return the service for a location. Ok, all 3 patches applied. Many thanks. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH v3 0/2] USB tethering
Hi Guillaume, On Fri, Feb 04, 2011 at 08:04:02AM +, Lucas, GuillaumeX wrote: > Hi, > > Following patch fix issues for USB tethering. > Those patches was successfully tested in HW with latest version of connman > and latest version of ofono. > > Patch "Call __connman_technology_add_interface() after rtnl->newlink()" from > Martin is no more necessary with those patches. > Thanks a lot, I applied the 2 patches. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [RFC 1/2] doc: Add service provisioning method in Manager API
On Fri, Feb 04, 2011 at 12:00:36PM +0200, Patrik Flykt wrote: > On Fri, 2011-02-04 at 11:41 +0200, ext Bragge Henri wrote: > > > > + same format as configuration files, see > > > > + config-format.txt. > > > I think we talked about an XML file instead. > > > > In my opinion XML is overkill, and I'm afraid I wouldn't have time to > > implement it. String implementation would be easy after sharing some > > code from src/config.c. > > Um, we had a chat with Marcel on #connman, and he specifically said > doc/config-format.txt was supposed to be used. Ok, I missed that one. > The somewhat longish > dicussion ended like this January 18th: > > (14:29:23) pfl: holtmann: so we can agree on doc/config-format.txt > specifying the content of eap configureation, a provisioning tool using > connman yet-to-be-done-dbus-api or while that's missing, write the file > directly to /var/lib/connman since connman does inotify on the dir? > (14:29:34) holtmann: You do wanna build your 802.1x configuration on > your PC at home and just import it. > (14:30:16) holtmann: pfl: I would go for something like this. One detail > would be to be able to include the certificates in the config file. > Which we do not support yet. > > If you want to have another format, I'd suggest going with a (or the > above!) DBus API dict containing attribute/value pairs. Simplest to > parse, simplest to implement. No, it was either config-format or an XML file. So let's go with config-format.txt then. > I would not be too fond of yet another > configuration language in XML, as we already have doc/config-format.txt > anyway. In my view, an XML file would be simpler to distribute from a sysadmin point of view. But here again, this is just speculation so let's go for the simpler config-format path at first. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [RFC] doc: Add EAP login support in Agent API
Bragge Henri writes: > Hi Samuel, > > On Thu, 2011-02-03 at 17:13 +0100, Samuel Ortiz wrote: >> Hi Henri, > >> > @@ -97,6 +102,18 @@ Arguments string Type >> >Contains the list of alternate field names this >> >field can be represented by. >> > >> > + string Phase2 >> > + >> > + EAP Phase2 authentication method. For example "gtc", >> > + "mschapv2", or "md5". Used to supplement Passphrase >> > + field when requesting credentials for 802.1X networks. >> This is something I don't want to present to the user. Typically, the user >> knows its identity and a passphrase associated to it. So asking for an EAP >> passphrase is good enough. >> > > I agree that we don't want to show Phase2 method to the user as such. > Instead the reason for it is to enable customization of UI further by > having a different dialog for, say, MSCHAPV2 username/password dialog > and GTC challenge dialog. > > I've seen such customizations for example in Nokia N900, where user is > asked for "Username" & "Password" in the former case and "Response" in > the latter. I agree with Henri. Providing the authentication method makes it easier for the UI application to help the user. > Maybe instead of the literal phase2 method, additional Passphrase types > could be introduced, like "eap-password" and "eap-response"? To me that sounds a bit artificial and I don't see any benefit compared to using real method names. And besides there's no harm providing the method to the UI, and it's extremely simple to implement. -- Kalle Valo ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: ConnMan relicensing
Russell Dill writes: > Has ConnMan every been relicensed (eg, distributed under a license > other than the GPL) and/or does Intel have any plans to relicense > ConnMan? Relicensing connman would be difficult because there are so many contributors and you would need approval from all of them. -- Kalle Valo ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [RFC] doc: Add EAP login support in Agent API
Hi Henri, On Fri, Feb 04, 2011 at 11:40:00AM +0200, Bragge Henri wrote: > I've seen such customizations for example in Nokia N900, where user is > asked for "Username" & "Password" in the former case and "Response" in > the latter. > > Maybe instead of the literal phase2 method, additional Passphrase types > could be introduced, like "eap-password" and "eap-response"? I'm fine with that, but note that getting the Challenge string or not should be enough for a UI to know if it has to ask for a password or for a response. So having both is redundant, but that's no big deal. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: ConnMan relicensing
Hi Russell, On Fri, Feb 04, 2011 at 01:11:08AM -0700, Russell Dill wrote: > Has ConnMan every been relicensed (eg, distributed under a license > other than the GPL) and/or does Intel have any plans to relicense > ConnMan? Intel has no plans to relicense ConnMan. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [RFC 1/2] doc: Add service provisioning method in Manager API
On Fri, 2011-02-04 at 11:49 +0100, ext Samuel Ortiz wrote: > No, it was either config-format or an XML file. So let's go with > config-format.txt then. Yes, I know. But I had to comment :-). > In my view, an XML file would be simpler to distribute from a sysadmin point > of view. But here again, this is just speculation so let's go for the simpler > config-format path at first. True. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH v2 1/4] gsupplicant: Report AddNetwork and SelectNetwork errors to caller
From: Patrik Flykt Call interface_connect_data callback when an error is reported for wpa_supplicant AddNetwork and SelectNetwork method calls. In the case of WPA-PSK or WEP key being incorrectly formatted, set the callback result to -ENOKEY. --- v2: use strncmp, get rid of single quotes ('') gsupplicant/supplicant.c | 30 -- 1 files changed, 28 insertions(+), 2 deletions(-) diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 7a3fd4c..2c3e5dd 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -2410,6 +2410,24 @@ int g_supplicant_interface_scan(GSupplicantInterface *interface, interface_scan_params, interface_scan_result, data); } +static int parse_supplicant_error(DBusMessageIter *iter) +{ + int err = -ECANCELED; + char *key; + + while (dbus_message_iter_get_arg_type(iter) == DBUS_TYPE_STRING) { + dbus_message_iter_get_basic(iter, &key); + if (strncmp(key, "psk", 4) == 0 || + strncmp(key, "wep_key", 7) == 0) { + err = -ENOKEY; + break; + } + dbus_message_iter_next(iter); + } + + return err; +} + static void interface_select_network_result(const char *error, DBusMessageIter *iter, void *user_data) { @@ -2419,8 +2437,10 @@ static void interface_select_network_result(const char *error, SUPPLICANT_DBG(""); err = 0; - if (error != NULL) - err = -EIO; + if (error != NULL) { + SUPPLICANT_DBG("SelectNetwork error %s", error); + err = parse_supplicant_error(iter); + } if (data->callback != NULL) data->callback(err, data->interface, data->user_data); @@ -2445,6 +2465,7 @@ static void interface_add_network_result(const char *error, struct interface_connect_data *data = user_data; GSupplicantInterface *interface = data->interface; const char *path; + int err; if (error != NULL) goto error; @@ -2466,6 +2487,11 @@ static void interface_add_network_result(const char *error, return; error: + SUPPLICANT_DBG("AddNetwork error %s", error); + err = parse_supplicant_error(iter); + if (data->callback != NULL) + data->callback(err, data->interface, data->user_data); + g_free(interface->network_path); interface->network_path = NULL; g_free(data->ssid); -- 1.7.2.3 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH v2 3/4] network: Add CONNMAN_NETWORK_ERROR_INVALID_KEY for a network
From: Patrik Flykt Add invalid key/passphrase definition for a network and propagate it to the associated service. --- include/network.h |1 + src/network.c | 13 + 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/include/network.h b/include/network.h index 0266b5e..6b93f16 100644 --- a/include/network.h +++ b/include/network.h @@ -51,6 +51,7 @@ enum connman_network_error { CONNMAN_NETWORK_ERROR_UNKNOWN = 0, CONNMAN_NETWORK_ERROR_ASSOCIATE_FAIL = 1, CONNMAN_NETWORK_ERROR_CONFIGURE_FAIL = 2, + CONNMAN_NETWORK_ERROR_INVALID_KEY = 3, }; #define CONNMAN_NETWORK_PRIORITY_LOW -100 diff --git a/src/network.c b/src/network.c index 02d7c5c..09d4d2b 100644 --- a/src/network.c +++ b/src/network.c @@ -534,6 +534,16 @@ static void set_configure_error(struct connman_network *network) CONNMAN_SERVICE_STATE_FAILURE); } +static void set_invalid_key_error(struct connman_network *network) +{ + struct connman_service *service; + + service = __connman_service_lookup_from_network(network); + + __connman_service_indicate_error(service, + CONNMAN_SERVICE_ERROR_INVALID_KEY); +} + void connman_network_set_ipv4_method(struct connman_network *network, enum connman_ipconfig_method method) { @@ -588,6 +598,9 @@ void connman_network_set_error(struct connman_network *network, case CONNMAN_NETWORK_ERROR_CONFIGURE_FAIL: set_configure_error(network); break; + case CONNMAN_NETWORK_ERROR_INVALID_KEY: + set_invalid_key_error(network); + break; } } -- 1.7.2.3 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH v2 2/4] service: Add CONNMAN_SERVICE_ERROR_INVALID_KEY to service error enum
From: Patrik Flykt Add invalid key/passphrase definition for a service and unset the current passphrase when this error is indicated. --- include/service.h |1 + src/service.c |7 +++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/include/service.h b/include/service.h index faa6cf8..910fe1b 100644 --- a/include/service.h +++ b/include/service.h @@ -85,6 +85,7 @@ enum connman_service_error { CONNMAN_SERVICE_ERROR_CONNECT_FAILED = 4, CONNMAN_SERVICE_ERROR_LOGIN_FAILED = 5, CONNMAN_SERVICE_ERROR_AUTH_FAILED= 6, + CONNMAN_SERVICE_ERROR_INVALID_KEY= 7, }; enum connman_service_proxy_method { diff --git a/src/service.c b/src/service.c index fa2d3e4..be72925 100644 --- a/src/service.c +++ b/src/service.c @@ -265,6 +265,8 @@ static const char *error2string(enum connman_service_error error) return "login-failed"; case CONNMAN_SERVICE_ERROR_AUTH_FAILED: return "auth-failed"; + case CONNMAN_SERVICE_ERROR_INVALID_KEY: + return "invalid-key"; } return NULL; @@ -276,6 +278,8 @@ static enum connman_service_error string2error(const char *error) return CONNMAN_SERVICE_ERROR_DHCP_FAILED; else if (g_strcmp0(error, "pin-missing") == 0) return CONNMAN_SERVICE_ERROR_PIN_MISSING; + else if (g_strcmp0(error, "invalid-key") == 0) + return CONNMAN_SERVICE_ERROR_INVALID_KEY; return CONNMAN_SERVICE_ERROR_UNKNOWN; } @@ -3240,6 +3244,9 @@ int __connman_service_indicate_error(struct connman_service *service, service->error = error; + if (service->error == CONNMAN_SERVICE_ERROR_INVALID_KEY) + __connman_service_set_passphrase(service, NULL); + return __connman_service_indicate_state(service, CONNMAN_SERVICE_STATE_FAILURE); } -- 1.7.2.3 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH v2 4/4] wifi: Check invalid key/passphrase in gsupplicant connect callback
From: Patrik Flykt Use network struct as connect callback user data and set network error to CONNMAN_NETWORK_ERROR_INVALID_KEY if gsupplicant indicates key/passphrase error. For other errors < 0 set network error to CONNMAN_NETWORK_ERROR_CONFIGURE_FAIL. --- plugins/wifi.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index c4089c0..78da6ac 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -329,7 +329,17 @@ static void network_remove(struct connman_network *network) static void connect_callback(int result, GSupplicantInterface *interface, void *user_data) { - connman_error("%s", __func__); + struct connman_network *network = user_data; + + DBG("network %p result %d", network, result); + + if (result == -ENOKEY) { + connman_network_set_error(network, + CONNMAN_NETWORK_ERROR_INVALID_KEY); + } else if (result < 0) { + connman_network_set_error(network, + CONNMAN_NETWORK_ERROR_CONFIGURE_FAIL); + } } static GSupplicantSecurity network_security(const char *security) @@ -428,7 +438,7 @@ static int network_connect(struct connman_network *network) wifi->network = connman_network_ref(network); return g_supplicant_interface_connect(interface, ssid, - connect_callback, NULL); + connect_callback, network); } return -EINPROGRESS; -- 1.7.2.3 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH v2 0/4] Handle gsupplicant invalid key/passphrase
From: Patrik Flykt Hi, v2 rebases the patch set, uses 'strncmp' and removes single quotes (''). This patch set adds invalid key/passphrase detection in gsupplicant AddNetwork and SelectNetwork D-Bus method call return handling. The patches check for wpa_supplicant sending a D-Bus error in response to invalid formatting of WPA-PSK and WEP keys. If the error string is set in either of these calls, error result is set for the given callback. Currently only invalid keys are explicitely detected, other errors are indicated with -ECANCELED. Errors for invalid keys are defined for service and network structures. The wifi plugin checks against -ENOKEY, and sets the network struct error accordingly. The network error is then forwarded to the corresponding service struct, whereby the current key is unset and service marked as having failed. (A failed service will be reported normally through the Agent API, but this functionality exists already). Cheers, Patrik Patrik Flykt (4): gsupplicant: Report AddNetwork and SelectNetwork errors to caller service: Add CONNMAN_SERVICE_ERROR_INVALID_KEY to service error enum network: Add CONNMAN_NETWORK_ERROR_INVALID_KEY for a network wifi: Check invalid key/passphrase in gsupplicant connect callback gsupplicant/supplicant.c | 30 -- include/network.h|1 + include/service.h|1 + plugins/wifi.c | 14 -- src/network.c| 13 + src/service.c|7 +++ 6 files changed, 62 insertions(+), 4 deletions(-) -- 1.7.2.3 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH ipv6 v1 04/14] service: Split service state to IPv4 and IPv6 parts.
Hi Jukka, On Mon, Jan 24, 2011 at 02:12:05PM +0200, Jukka Rissanen wrote: > +static enum connman_service_state combine_state( > + enum connman_service_state state_a, > + enum connman_service_state state_b) > { > - switch (service->state) { > + enum connman_service_state result; > + > + if (state_a == state_b) { > + result = state_a; > + goto done; > + } > + > + if (state_a == CONNMAN_SERVICE_STATE_UNKNOWN) { > + result = state_b; > + goto done; > + } > + > + if (state_b == CONNMAN_SERVICE_STATE_UNKNOWN) { > + result = state_a; > + goto done; > + } > + > + if (state_a == CONNMAN_SERVICE_STATE_IDLE) { > + result = state_b; > + goto done; > + } > + > + if (state_b == CONNMAN_SERVICE_STATE_IDLE) { > + result = state_a; > + goto done; > + } > + > + if (state_a == CONNMAN_SERVICE_STATE_ASSOCIATION) { > + if (state_b == CONNMAN_SERVICE_STATE_CONFIGURATION || > + state_b == CONNMAN_SERVICE_STATE_ONLINE || > + state_b == CONNMAN_SERVICE_STATE_READY) > + result = state_b; > + else > + result = state_a; > + goto done; > + } > + > + if (state_b == CONNMAN_SERVICE_STATE_ASSOCIATION) { > + if (state_a == CONNMAN_SERVICE_STATE_CONFIGURATION || > + state_a == CONNMAN_SERVICE_STATE_ONLINE || > + state_a == CONNMAN_SERVICE_STATE_READY) > + result = state_a; > + else > + result = state_b; > + goto done; > + } > + > + if (state_a == CONNMAN_SERVICE_STATE_CONFIGURATION) { > + if (state_b == CONNMAN_SERVICE_STATE_ONLINE || > + state_b == CONNMAN_SERVICE_STATE_READY) > + result = state_b; > + else > + result = state_a; > + goto done; > + } > + > + if (state_b == CONNMAN_SERVICE_STATE_CONFIGURATION) { > + if (state_a == CONNMAN_SERVICE_STATE_ONLINE || > + state_a == CONNMAN_SERVICE_STATE_READY) > + result = state_a; > + else > + result = state_b; > + goto done; > + } > + > + if (state_a == CONNMAN_SERVICE_STATE_READY) { > + if (state_b == CONNMAN_SERVICE_STATE_ONLINE) > + result = state_b; > + else > + result = state_a; > + goto done; > + } > + > + if (state_b == CONNMAN_SERVICE_STATE_READY) { > + if (state_a == CONNMAN_SERVICE_STATE_ONLINE) > + result = state_a; > + else > + result = state_b; > + goto done; > + } > + > + if (state_a == CONNMAN_SERVICE_STATE_ONLINE) { > + result = state_a; > + goto done; > + } > + > + if (state_b == CONNMAN_SERVICE_STATE_ONLINE) { > + result = state_b; > + goto done; > + } > + > + if (state_a == CONNMAN_SERVICE_STATE_DISCONNECT) { > + result = state_b; > + goto done; > + } > + > + if (state_b == CONNMAN_SERVICE_STATE_DISCONNECT) { > + result = state_a; > + goto done; > + } > + > + result = CONNMAN_SERVICE_STATE_FAILURE; > + > +done: > +#if 0 > + /* Enable this only if needed, it prints too much data */ > + DBG("%s | %s => %s", state2string(state_a), state2string(state_b), > + state2string(result)); > +#endif I see what you mean, but please remove that part. > + return result; > +} > + > +static connman_bool_t is_connecting(struct connman_service *service, > + enum connman_service_state state) I don't really like that prototype, it's confusing. I'd like to keep the is_connecting() and is_connected() functions as they are, i.e. just taking a service as an argument, and using the service combined state. I'm fine with having a couple of is_connecting_state() and is_connected_state() routines that takes an additional state argument for the few special cases you need. Additionally, the is_connected() and is_connecting() routines could be a wrapper on top of them, taking the combined state as the state argument. > @@ -2811,15 +2972,25 @@ static gint service_compare(gconstpointer a, > gconstpointer b, > struct connman_service *service_a = (void *) a; > struct connman_service *service_b = (void *) b; > > - if (service_a->state != service_b->state) { > - if (is_connected(service_a) == TRUE) > + if (service_a->state_ipv4 != service_b->state_ipv4 && > +
Re: [PATCH ipv6 v1 07/14] network: Enable IPv6 autoconf to change the service state to ready.
Hi Jukka, On Mon, Jan 24, 2011 at 02:12:08PM +0200, Jukka Rissanen wrote: > --- > src/network.c | 35 +++ > 1 files changed, 35 insertions(+), 0 deletions(-) > > diff --git a/src/network.c b/src/network.c > index 05ee0c1..0d620a2 100644 > --- a/src/network.c > +++ b/src/network.c > @@ -735,6 +735,37 @@ static int manual_ipv6_set(struct connman_network > *network, > return 0; > } > > +static void autoconf_ipv6_set(struct connman_network *network, > + struct connman_ipconfig *ipconfig_ipv6) > +{ > + struct connman_service *service; > + struct connman_ipconfig *ipconfig; > + const char *nameserver = NULL; > + > + DBG("network %p", network); > + > + service = __connman_service_lookup_from_network(network); > + > + ipconfig = __connman_service_get_ip6config(service); > + > + __connman_device_increase_connections(network->device); > + > + __connman_device_set_network(network->device, network); > + > + connman_device_set_disconnected(network->device, FALSE); > + > + connman_element_get_value(&network->element, > + CONNMAN_PROPERTY_ID_IPV6_NAMESERVER, &nameserver); > + if (nameserver != NULL) > + __connman_service_append_nameserver(service, nameserver); > + > + network->connecting = FALSE; > + > + __connman_service_indicate_state(service, > + CONNMAN_SERVICE_STATE_UNKNOWN, > + CONNMAN_SERVICE_STATE_READY); > +} The patch looks fine, but I have a more generic v6 question: How are we going to handle the IPv6 gateways ? By looking at the kernel code, I see (as expected) that the route is installed by the kernel directly. So we should get an rtnl event for that. Currently we don't handle it properly for v6. We should catch the event, and eventually call into the connection.c so that we may be installing the right IPv6 default route. Have you given that a thought, or am I missing something ? Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH ipv6 v1 06/14] service: Only disconnect the service if both IPv4 and IPv6 states agree.
Hi Jukka, On Mon, Jan 24, 2011 at 02:12:07PM +0200, Jukka Rissanen wrote: > @@ -3298,6 +3300,8 @@ int __connman_service_indicate_state(struct > connman_service *service, > if (state == CONNMAN_SERVICE_STATE_READY) { > enum connman_service_proxy_method proxy_config; > > + g_atomic_int_inc(&service->connect_count); > + > set_reconnect_state(service, TRUE); > > __connman_service_set_favorite(service, TRUE); > @@ -3336,11 +3340,15 @@ int __connman_service_indicate_state(struct > connman_service *service, > > default_changed(); > } else if (state == CONNMAN_SERVICE_STATE_DISCONNECT) { > - __connman_location_finish(service); > > - default_changed(); > + if (g_atomic_int_dec_and_test(&service->connect_count) == > + TRUE) { I wonder: Wouldn't a simple check that service->state_ipv4 == service->state_ipv6 == CONNMAN_SERVICE_STATE_DISCONNECT be enough ? Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH ipv6 v1 09/14] service: Set service state correctly when ipconfig is cleared.
Hi Jukka, On Mon, Jan 24, 2011 at 02:12:10PM +0200, Jukka Rissanen wrote: > --- > src/network.c | 11 +-- > 1 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/src/network.c b/src/network.c > index d21f7b6..f1a6e38 100644 > --- a/src/network.c > +++ b/src/network.c > @@ -1057,12 +1057,14 @@ int __connman_network_clear_ipconfig(struct > connman_network *network, > { > struct connman_service *service; > enum connman_ipconfig_method method; > + enum connman_ipconfig_type type; > > service = __connman_service_lookup_from_network(network); > if (service == NULL) > return -EINVAL; > > method = __connman_ipconfig_get_method(ipconfig); > + type = __connman_ipconfig_get_config_type(ipconfig); > > switch (method) { > case CONNMAN_IPCONFIG_METHOD_UNKNOWN: > @@ -1080,8 +1082,13 @@ int __connman_network_clear_ipconfig(struct > connman_network *network, > break; > } > > - __connman_service_indicate_state(service, > - CONNMAN_SERVICE_STATE_CONFIGURATION, > > + if (type == CONNMAN_IPCONFIG_TYPE_IPV6) > + __connman_service_indicate_state(service, > + CONNMAN_SERVICE_STATE_UNKNOWN, > + CONNMAN_SERVICE_STATE_DISCONNECT); > + else if (type == CONNMAN_IPCONFIG_TYPE_IPV4) > + __connman_service_indicate_state(service, > + CONNMAN_SERVICE_STATE_DISCONNECT, > CONNMAN_SERVICE_STATE_UNKNOWN); No, when we clear the ipconfig we're not disconnected, but simply back to the configuration phase. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH ipv6 v1 11/14] service: Check service state properly if user changes method.
Hi Jukka, On Mon, Jan 24, 2011 at 02:12:12PM +0200, Jukka Rissanen wrote: > --- > src/service.c | 30 -- > 1 files changed, 28 insertions(+), 2 deletions(-) > > diff --git a/src/service.c b/src/service.c > index b775d44..38f8f2f 100644 > --- a/src/service.c > +++ b/src/service.c > @@ -2203,6 +2203,9 @@ static DBusMessage *set_property(DBusConnection *conn, > g_str_equal(name, "IPv6.Configuration")) { > > struct connman_ipconfig *ipv4 = NULL, *ipv6 = NULL; > + enum connman_ipconfig_method old_method; > + enum connman_ipconfig_method method = > + CONNMAN_IPCONFIG_METHOD_UNKNOWN; > enum connman_service_state state = > CONNMAN_SERVICE_STATE_UNKNOWN; > int err = 0; > @@ -2214,26 +2217,49 @@ static DBusMessage *set_property(DBusConnection *conn, > return __connman_error_invalid_property(msg); > > if (g_str_equal(name, "IPv4.Configuration") == TRUE) { > + ipv4 = service->ipconfig_ipv4; > + old_method = __connman_ipconfig_get_method(ipv4); > state = service->state_ipv4; > + > if (is_connecting(service, state) || > is_connected(service, state)) > __connman_network_clear_ipconfig( > service->network, > service->ipconfig_ipv4); > > - ipv4 = service->ipconfig_ipv4; > err = __connman_ipconfig_set_config(ipv4, &value); > + method = __connman_ipconfig_get_method(ipv4); > + if (err == 0 && > + old_method == CONNMAN_IPCONFIG_METHOD_OFF && > + method == CONNMAN_IPCONFIG_METHOD_DHCP) { > + state = service->state_ipv4 = > + CONNMAN_SERVICE_STATE_CONFIGURATION; > + __connman_ipconfig_enable(ipv4); > + } > + > + DBG("err %d ipv4 %p method %d state %s", err, ipv4, > + method, state2string(state)); I'll have to test all this, but could you please come up with a separate routine for that ? The code starts to look unreadable to me. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH v2 1/4] gsupplicant: Report AddNetwork and SelectNetwork errors to caller
Hi Patrik, On Fri, Feb 04, 2011 at 03:14:19PM +0200, patrik.fl...@nokia.com wrote: > From: Patrik Flykt > > Call interface_connect_data callback when an error is reported for > wpa_supplicant AddNetwork and SelectNetwork method calls. In the case > of WPA-PSK or WEP key being incorrectly formatted, set the callback > result to -ENOKEY. > --- > v2: use strncmp, get rid of single quotes ('') > > gsupplicant/supplicant.c | 30 -- > 1 files changed, 28 insertions(+), 2 deletions(-) > > diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c > index 7a3fd4c..2c3e5dd 100644 > --- a/gsupplicant/supplicant.c > +++ b/gsupplicant/supplicant.c > @@ -2410,6 +2410,24 @@ int g_supplicant_interface_scan(GSupplicantInterface > *interface, > interface_scan_params, interface_scan_result, data); > } > > +static int parse_supplicant_error(DBusMessageIter *iter) > +{ > + int err = -ECANCELED; > + char *key; > + > + while (dbus_message_iter_get_arg_type(iter) == DBUS_TYPE_STRING) { > + dbus_message_iter_get_basic(iter, &key); > + if (strncmp(key, "psk", 4) == 0 || 4 ? If you meant 3 I can fix it myself and apply those patches. Otherwise, you'll have to explain :) Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: ConnMan relicensing
On Fri, Feb 4, 2011 at 4:31 AM, Samuel Ortiz wrote: > Hi Russell, > > On Fri, Feb 04, 2011 at 01:11:08AM -0700, Russell Dill wrote: >> Has ConnMan every been relicensed (eg, distributed under a license >> other than the GPL) and/or does Intel have any plans to relicense >> ConnMan? > Intel has no plans to relicense ConnMan. > > Cheers, > Samuel. > > -- > Intel Open Source Technology Centre > http://oss.intel.com/ > Ok, then can you just add proper authorship information for gdhcp/client.c, gdhcp/common,c, and gdhcp/common.h? See: http://git.busybox.net/busybox/tree/networking/udhcp/clientpacket.c?id=53f72bb3f0bd81b1d3af8939a16ec730c7e750c3 http://git.busybox.net/busybox/tree/networking/udhcp/dhcpc.c http://git.busybox.net/busybox/tree/networking/udhcp/common.c http://git.busybox.net/busybox/tree/networking/udhcp/common.h Thanks ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: ConnMan relicensing
Hi Russ, On Fri, Feb 04, 2011 at 10:22:59AM -0700, Russell Dill wrote: > On Fri, Feb 4, 2011 at 4:31 AM, Samuel Ortiz wrote: > > Hi Russell, > > > > On Fri, Feb 04, 2011 at 01:11:08AM -0700, Russell Dill wrote: > >> Has ConnMan every been relicensed (eg, distributed under a license > >> other than the GPL) and/or does Intel have any plans to relicense > >> ConnMan? > > Intel has no plans to relicense ConnMan. > > > > Cheers, > > Samuel. > > > > -- > > Intel Open Source Technology Centre > > http://oss.intel.com/ > > > > Ok, then can you just add proper authorship information for > gdhcp/client.c, gdhcp/common,c, and gdhcp/common.h? I would really prefer for you to send me a patch for that. This way we can track it from git, with a patch coming from you. > See: > > http://git.busybox.net/busybox/tree/networking/udhcp/clientpacket.c?id=53f72bb3f0bd81b1d3af8939a16ec730c7e750c3 > http://git.busybox.net/busybox/tree/networking/udhcp/dhcpc.c > http://git.busybox.net/busybox/tree/networking/udhcp/common.c > http://git.busybox.net/busybox/tree/networking/udhcp/common.h Right, sorry about that. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
[PATCH] network-model: Adapt to new service security API
The security settings are no longer represented by a string but by a strings array. --- The change will appear in ConnMan 0.69. I suspect this doesn't fit well with your typical GTK coding style. Please let me know if that's so and I'll try to behave. carrick/carrick-network-model.c | 19 ++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/carrick/carrick-network-model.c b/carrick/carrick-network-model.c index c73c0ed..4843895 100644 --- a/carrick/carrick-network-model.c +++ b/carrick/carrick-network-model.c @@ -261,6 +261,7 @@ network_model_service_get_properties_cb (DBusGProxy *service, const gchar *name = NULL; const gchar *state = NULL; const gchar *security = NULL; + const gchar**securities = NULL; const gchar *type = NULL; gboolean favorite = FALSE; gboolean passphrase_required = FALSE; @@ -310,7 +311,23 @@ network_model_service_get_properties_cb (DBusGProxy *service, value = g_hash_table_lookup (properties, "Security"); if (value) -security = g_value_get_string (value); +{ + securities = g_value_get_boxed (value); + security = securities[0]; + + while (security) +{ + if (g_strcmp0 ("none", security) == 0 || + g_strcmp0 ("wep", security) == 0 || + g_strcmp0 ("psk", security) == 0 || + g_strcmp0 ("ieee8021x", security) == 0 || + g_strcmp0 ("wpa", security) == 0 || + g_strcmp0 ("rsn", security) == 0) + break; + + security++; + } +} value = g_hash_table_lookup (properties, "PassphraseRequired"); if (value) -- 1.7.2.3 -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
service API changes
Hi folks, Just a heads up for UI and apps developers working on top of ConnMan: As of ConnMan 0.69 (soon to be released), the service security property is no longer a string but an array of strings. For WiFi services, one of the string will contain the actual security protocol (none, wep, psk or ieee80211x) that used to be the security property string. The rest of the strings carry additional security properties (only "wps" is supported for now, for WPS enabled WiFi APs). Also, the boolean WPS property has been removed. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Connman Faults When Loading Bogus, Empty Profiles
I recently found a case in which: 1) Connman seems to create empty, strange profiles. 2) When start-up up on a subsequent occasion, connman faults when attempting to load and add these profiles. In the post-mortem, I found: drwxr-xr-x 3 root root 0Feb 4 12:00 . drwxr-xr-x 4 root root 0Feb 4 12:00 .. -rw-r--r-- 1 root root 0Feb 4 12:20 .profile -rw--- 1 root root 6467 Feb 4 12:59 default.profile drwxr-xr-x 2 root root 0Feb 4 12:20 stats -rw-r--r-- 1 root root 0Feb 4 12:20 u.profile in the /var/lib/connman directory. The log and backtrace is as follows below. I'll follow up with the results of a debugger session: connmand[274]: Connection Manager version 0.68 connmand[274]: connman/connman-0.68/src/dbus.c:__connman_dbus_init() connmand[274]: connman/connman-0.68/src/storage.c:__connman_storage_init() connmand[274]: connman/connman-0.68/src/element.c:__connman_element_init() connmand[274]: connman/connman-0.68/src/element.c:connman_element_create() element 0x60008 connmand[274]: connman/connman-0.68/src/element.c:__connman_element_initialize() element 0x60008 connmand[274]: connman/connman-0.68/src/technology.c:__connman_technology_init() connmand[274]: connman/connman-0.68/src/notifier.c:__connman_notifier_init() connmand[274]: connman/connman-0.68/src/location.c:__connman_location_init() connmand[274]: connman/connman-0.68/src/service.c:__connman_service_init() connmand[274]: connman/connman-0.68/src/storage.c:connman_storage_register() storage 0x57018 name service connmand[274]: connman/connman-0.68/src/provider.c:__connman_provider_init() connmand[274]: connman/connman-0.68/src/notifier.c:connman_notifier_register() notifier 0x5714c name provider connmand[274]: connman/connman-0.68/src/network.c:__connman_network_init() connmand[274]: connman/connman-0.68/src/element.c:connman_driver_register() driver 0x56d20 name network connmand[274]: connman/connman-0.68/src/device.c:__connman_device_init() connmand[274]: connman/connman-0.68/src/storage.c:connman_storage_register() storage 0x56cf4 name device connmand[274]: connman/connman-0.68/src/element.c:connman_driver_register() driver 0x56cd8 name device connmand[274]: connman/connman-0.68/src/agent.c:__connman_agent_init() connmand[274]: connman/connman-0.68/src/iptables.c:__connman_iptables_init() connmand[274]: connman/connman-0.68/src/tethering.c:__connman_tethering_init() connmand[274]: connman/connman-0.68/src/counter.c:__connman_counter_init() connmand[274]: connman/connman-0.68/src/manager.c:__connman_manager_init() connmand[274]: connman/connman-0.68/src/notifier.c:connman_notifier_register() notifier 0x56d70 name manager connmand[274]: connman/connman-0.68/src/profile.c:__connman_profile_init() connmand[274]: connman/connman-0.68/src/storage.c:connman_storage_register() storage 0x56f8c name profile connmand[274]: connman/connman-0.68/src/config.c:__connman_config_init() connmand[274]: connman/connman-0.68/src/config.c:read_configs() connmand[274]: connman/connman-0.68/src/stats.c:__connman_stats_init() connmand[274]: connman/connman-0.68/src/resolver.c:__connman_resolver_init() dnsproxy 1 connmand[274]: connman/connman-0.68/src/dnsproxy.c:__connman_dnsproxy_init() dnsproxy 1 connmand[274]: connman/connman-0.68/src/dnsproxy.c:create_dns_listener() connmand[274]: connman/connman-0.68/src/dnsproxy.c:create_dns_listener() connmand[274]: connman/connman-0.68/src/resolver.c:__connman_resolvfile_append() interface lo server 127.0.0.1 connmand[274]: connman/connman-0.68/src/notifier.c:connman_notifier_register() notifier 0x57324 name dnsproxy connmand[274]: connman/connman-0.68/src/ipconfig.c:__connman_ipconfig_init() connmand[274]: connman/connman-0.68/src/rtnl.c:__connman_rtnl_init() connmand[274]: connman/connman-0.68/src/task.c:__connman_task_init() connmand[274]: connman/connman-0.68/src/proxy.c:__connman_proxy_init() connmand[274]: connman/connman-0.68/src/detect.c:__connman_detect_init() connmand[274]: connman/connman-0.68/src/rtnl.c:connman_rtnl_register() rtnl 0x57164 name detect connmand[274]: connman/connman-0.68/src/session.c:__connman_session_init() connmand[274]: connman/connman-0.68/src/timeserver.c:__connman_timeserver_init() connmand[274]: connman/connman-0.68/src/plugin.c:__connman_plugin_init() connmand[274]: Checking loopback interface settings connmand[274]: System hostname is salmon.local connmand[274]: System domainname is comcast.com connmand[274]: connman/connman
[PATCH] Connman Faults When Loading Bogus, Empty Profiles
Ignore malformed profiles. That is, if there is no non-extension portion to the file (i.e. it is precisely named ".profile"), then ignore it. Passing such files to create_profile will result in a SIGABRT. Regards, Grant --- diff -aruN a/src/profile.c b/src/profile.c --- a/src/profile.c 2010-09-09 10:09:04.0 -0700 +++ b/src/profile.c 2011-02-04 15:10:12.0 -0800 @@ -462,6 +462,16 @@ if (ident == NULL) continue; + /* If there is no non-extension portion to the file (i.e. it is +* precisely named ".profile"), then ignore it. Passing such files +* to create_profile will result in a SIGABRT. +*/ + + if (file == ident) { + connman_info("Ignoring malformed profile '%s'\n", file); + continue; + } + str = g_string_new_len(file, ident - file); if (str == NULL) continue; -- ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman