Re: [PATCH ipv6 v3 00/12] Support IPv6 only networks
Hi Jukka, On Thu, Feb 10, 2011 at 05:52:09PM +0200, Jukka Rissanen wrote: > Hi Samuel, > > here is the v3 of the IPv6 only patchset. Thanks a lot. I applied all patches, and added a correction for patch #6, as we want to go back to IDLE mode when calling set_connected() wit a disconnected network. 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] doc: Add EAP login support in Agent API
Hi Henri, On Thu, Feb 10, 2011 at 04:05:09PM +0200, Henri Bragge wrote: > --- > > How about this? "eap-" not absolutely necessary prefix for types but I tried > to > avoid any confusion. > > PATCH v2: - dropped phase2 method, new fields types "eap-password" and > "eap-response" instead That would be a good compromise, yes. Let's go for that one. 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 v1] doc: Add EAP login support in Agent API
Hi Patrik, On Thu, Feb 10, 2011 at 03:55:50PM +0200, Patrik Flykt wrote: > > Hi, > > On Wed, 2011-02-09 at 20:21 +0100, ext Samuel Ortiz wrote: > > > + string AuthMethod > > > + > > > + EAP Phase2 authentication method. For example "gtc", > > > + "mschapv2" or "md5". Used to supplement Passphrase > > > + field when requesting credentials for 802.1X networks. > > > + > > I don't think that's what we agreed upon. In fact, and as stated > > previously, I > > don't want to export those gory details to the user. > > Unfortunately the handheld UI wants to have some level of details, > should it choose to inform the user about the authentication method in > use. It does not necessarily need to be the 'AuthMethod', it can also be > the 'Type' field as proposed by Henri. Yes, I'm fine with that. > > The only thing the user will know is that she/he has to enter this cryptic > > string displayed on her/his RSA dongle. Or a company username/password. And > > that can be properly handled by the Identity/Passphrase strings sent to the > > agent. > > Here we want to support the user slightly more by giving the UI a chance > to help the user with the authentication method. Slightly more is ok. But down to the EAP details, no. So Henri's latest proposal is a good compromise 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
[PATCH] network: IPv6 must go through disconnect state before idle.
--- Hi Samuel, please apply this patch as without it the system will not go offline. The patch adds DISCONNECT state for IPv6 that should be entered before IDLE state. Eventually the IPv6 disconnection should be handled in connection.c as you pointed out in IRC but that probably needs to wait until Daniel's element removal patches are commited. Regards, Jukka src/network.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/network.c b/src/network.c index 5bba620..be2cae5 100644 --- a/src/network.c +++ b/src/network.c @@ -880,6 +880,13 @@ static gboolean set_connected(gpointer user_data) CONNMAN_SERVICE_STATE_IDLE, CONNMAN_IPCONFIG_TYPE_IPV4); + /* TODO: eventually the IPv6 disconnect state should be handled +* in connection.c +*/ + __connman_service_indicate_state(service, + CONNMAN_SERVICE_STATE_DISCONNECT, + CONNMAN_IPCONFIG_TYPE_IPV6); + __connman_service_indicate_state(service, CONNMAN_SERVICE_STATE_IDLE, CONNMAN_IPCONFIG_TYPE_IPV6); -- 1.7.0.4 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [RFC v7 00/12] DHCP refactoring (aka get rid of DHCP element)
Hi Daniel, On Wed, Feb 09, 2011 at 12:03:48PM +0100, Daniel Wagner wrote: > From: Daniel Wagner > > Hi, > > another update on this series. Up to the connection element removal patch > it should work. Read: the removal of the connection element works ;) Very good. I really appreciate your work on this one, thanks a lot. I commented on several patches. The connection one (#8) is really going in the right direction. I found some stuff to fix, and I may find other ones with your next one, as this is quite a serious change. 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 v7 01/12] service: Refactor Service nameserver API
Hi Daniel, On Wed, Feb 09, 2011 at 12:03:49PM +0100, Daniel Wagner wrote: > From: Daniel Wagner > > __connman_service_append/remove_namerserver() is renamed to > __connman_service_nameserver_append/remove to be more consistent with > the other Service API naming. Also the semantic changes to > append/remove instead of set/clear. > > The list of configured nameservers takes preference over the list of > discovered (DHCP, VPN, ...) nameservers. It looks better now. I still have some minor comments though: > @@ -403,32 +410,132 @@ static void update_nameservers(struct connman_service > *service) > connman_resolver_flush(); > } > > -void __connman_service_append_nameserver(struct connman_service *service, > +static int nameserver_append(char ***nameservers, const char *nameserver) I would prefer this one to simply take a service pointer and the nameserver pointer as arguments. > +static void nameserver_add_routes(int index, char ***nameservers, > + const char *gw) > +{ > + char **servers; > + int i; > + > + servers = *nameservers; > + > + for (i = 0; servers[i] != NULL; i++) { > + if (connman_inet_compare_subnet(index, servers[i])) > + continue; > + > + connman_inet_add_host_route(index, servers[i], gw); > + } > +} > + > +static void nameserver_del_routes(int index, char ***nameservers) > +{ > + char **servers; > + int i; > + > + servers = *nameservers; > + > + for (i = 0; servers[i] != NULL; i++) > + connman_inet_del_host_route(index, servers[i]); For those 2 routines, you just need a **namservers pointer (not ***). > @@ -833,6 +927,19 @@ static void append_ipv6config(DBusMessageIter *iter, > void *user_data) > iter); > } > > +static void append_nameserver(DBusMessageIter *iter, char ***nameservers) Ditto. 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 v7 11/12] dhcp: Remove DHCP element
Hi Daniel, On Wed, Feb 09, 2011 at 12:03:59PM +0100, Daniel Wagner wrote: > From: Daniel Wagner I think you have not changed this part according to my last comments on it. 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 v7 08/12] connection: Remove connection element
Hi Daniel, On Wed, Feb 09, 2011 at 12:03:56PM +0100, Daniel Wagner wrote: > @@ -154,49 +136,47 @@ static void connection_newgateway(int index, const char > *gateway) > > static void set_default_gateway(struct gateway_data *data) > { > - struct connman_element *element = data->element; > - struct connman_service *service = NULL; > + int index; > > DBG("gateway %s", data->ipv4_gateway); > > if (data->vpn == TRUE) { > - connman_inet_set_gateway_address(data->index, data->vpn_ip); > + connman_inet_set_gateway_address(data->vpn_phy_index, > + data->vpn_ip); Are you sure about this one ? > diff --git a/src/connman.h b/src/connman.h > index c914555..92754ac 100644 > --- a/src/connman.h > +++ b/src/connman.h > @@ -308,6 +308,12 @@ void __connman_ipv4_cleanup(void); > int __connman_connection_init(void); > void __connman_connection_cleanup(void); > > +int __connman_connection_gateway_add(struct connman_service *service, > + const char *ipv4_gateway, > + const char *ipv6_gateway, > + const char *peer); > +void __connman_connection_gateway_remove(struct connman_service *service); > + > gboolean __connman_connection_update_gateway(void); > > int __connman_wpad_init(void); > @@ -533,6 +539,11 @@ const char *__connman_service_get_domainname(struct > connman_service *service); > const char *__connman_service_get_nameserver(struct connman_service > *service); > void __connman_service_set_proxy_autoconfig(struct connman_service *service, > const char *url); > +int __connman_service_gateway_add(struct connman_service *service, > + const char *ipv4_gateway, > + const char *ipv6_gateway, > + const char *peer); > +void __connman_service_gateway_remove(struct connman_service *service); Having both APIs is confusing. Having only the __connman_connection_* one is fine with me. > diff --git a/src/ipv4.c b/src/ipv4.c > index f7b664b..c827a29 100644 > --- a/src/ipv4.c > +++ b/src/ipv4.c > @@ -39,12 +39,12 @@ > static int ipv4_probe(struct connman_element *element) > { > struct connman_service *service; > - struct connman_ipconfig *ipconfig; > - struct connman_element *connection; > const char *address = NULL, *netmask = NULL, *broadcast = NULL; > const char *peer = NULL, *nameserver = NULL, *pac = NULL; > + const char *domainname = NULL, *ipv4_gw = NULL, *ipv6_gw = NULL; > char *timeserver = NULL; > unsigned char prefixlen; > + int err; > > DBG("element %p name %s", element, element->name); > connman_element_get_value(element, > @@ -63,6 +63,14 @@ static int ipv4_probe(struct connman_element *element) > connman_element_get_value(element, > CONNMAN_PROPERTY_ID_IPV4_PAC, &pac); > > + connman_element_get_value(element, > + CONNMAN_PROPERTY_ID_DOMAINNAME, &domainname); > + > + connman_element_get_value(element, > + CONNMAN_PROPERTY_ID_IPV4_GATEWAY, &ipv4_gw); > + connman_element_get_value(element, > + CONNMAN_PROPERTY_ID_IPV6_GATEWAY, &ipv6_gw); > + > DBG("address %s", address); > DBG("peer %s", peer); > DBG("netmask %s", netmask); > @@ -88,25 +96,20 @@ static int ipv4_probe(struct connman_element *element) > > connman_timeserver_append(timeserver); > > - connection = connman_element_create(NULL); > - > - connection->type= CONNMAN_ELEMENT_TYPE_CONNECTION; > - connection->index = element->index; > - connection->devname = connman_inet_ifname(element->index); > + err = __connman_service_gateway_add(service, ipv4_gw, ipv6_gw, peer); > + if (err < 0) > + return err; > > - ipconfig = __connman_service_get_ip6config(service); > - if (ipconfig != NULL) > - __connman_ipconfig_set_element_ipv6_gateway( > - ipconfig, connection); > + __connman_service_set_domainname(service, domainname); > > - if (connman_element_register(connection, element) < 0) > - connman_element_unref(connection); > + __connman_service_indicate_state(service, CONNMAN_SERVICE_STATE_READY); I would prefere to keep the state setting in the connection code, as it will also be used by the IPv6 code. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman