crash report (P2P related?)
Hi, I'm not sure when the below abort happened, but I had been testing P2P earlier and found connman like this when I resumed from suspend. Connman was pulled on Jan 26 (499a424d), supplicant is a couple of weeks older. HTH, Jussi connmand[8129]: p2p-wlan0-3 {newlink} index 12 address 0C:8B:FD:5F:12:FE mtu 1500 connmand[8129]: p2p-wlan0-3 {newlink} index 12 operstate 2 DOWN connmand[8129]: src/detect.c:detect_newlink() type 1 index 12 connmand[8129]: plugins/wifi.c:wifi_newlink() index 12 flags 36866 change 65 connmand[8129]: plugins/wifi.c:wifi_newlink() interface down connmand[8129]: src/rtnl.c:rtnl_message() buf 0x7fff08921670 len 92 connmand[8129]: src/rtnl.c:rtnl_message() DELADDR len 92 type 21 flags 0x seq 0 pid 0 connmand[8129]: src/ipconfig.c:__connman_ipconfig_deladdr() index 12 connmand[8129]: (null) {del} address 192.168.16.20/24 label p2p-wlan0-3 connmand[8129]: src/rtnl.c:rtnl_message() buf 0x7fff08921670 len 60 connmand[8129]: src/rtnl.c:rtnl_message() DELROUTE len 60 type 25 flags 0x seq 0 pid 0 connmand[8129]: src/rtnl.c:rtnl_message() buf 0x7fff08921670 len 488 connmand[8129]: src/rtnl.c:rtnl_message() DELLINK len 488 type 17 flags 0x seq 0 pid 0 connmand[8129]: p2p-wlan0-3 {dellink} index 12 operstate 2 DOWN connmand[8129]: src/detect.c:detect_dellink() type 1 index 12 connmand[8129]: src/device.c:connman_device_unregister() device 0xcefd10 name Wireless connmand[8129]: src/device.c:remove_device() device 0xcefd10 connmand[8129]: src/device.c:__connman_device_disable() device 0xcefd10 connmand[8129]: plugins/wifi.c:wifi_disable() device 0xcefd10 wifi 0xcf01f0 connmand[8129]: src/device.c:connman_device_remove_network() device 0xcefd10 network 0xd06ca0 connmand[8129]: src/device.c:free_network() network 0xd06ca0 connmand[8129]: src/network.c:network_remove() network 0xd06ca0 name DIRECT-AP[TV][LG]32LN575S-ZE connmand[8129]: src/service.c:__connman_service_remove_from_network() network 0xd06ca0 service 0xd0dbf0 connmand[8129]: src/connection.c:__connman_connection_gateway_remove() service 0xd0dbf0 type 3 connmand[8129]: src/service.c:connman_service_unref_debug() 0xd0dbf0 ref 0 by src/service.c:6828:__connman_service_remove_from_network() connmand[8129]: src/service.c:__connman_service_disconnect() service 0xd0dbf0 connmand[8129]: src/agent.c:connman_agent_cancel() context 0xd0dbf0 connmand[8129]: src/network.c:__connman_network_disconnect() network 0xd06ca0 connmand[8129]: src/service.c:service_free() service 0xd0dbf0 connmand[8129]: src/service.c:service_schedule_removed() service 0xd0dbf0 /net/connman/service/wifi_0c8bfd5f12fe_4449524543542d41505b54565d5b4c475d33324c4e353735532d5a45_managed_psk connmand[8129]: src/wispr.c:__connman_wispr_stop() service 0xd0dbf0 connmand[8129]: src/service.c:stats_stop() service 0xd0dbf0 connmand[8129]: src/connection.c:update_order() connmand[8129]: src/service.c:__connman_service_get_order() service 0xd059f0 name jku order 1 split 0 connmand[8129]: src/connection.c:find_default_gateway() default 0xcfbec0 order 1 connmand[8129]: src/connection.c:__connman_connection_update_gateway() default 0xcfbec0 connmand[8129]: src/network.c:__connman_network_disconnect() network 0xd06ca0 connmand[8129]: src/network.c:connman_network_unref_debug() 0xd06ca0 name DIRECT-AP[TV][LG]32LN575S-ZE ref 2 by src/service.c:4434:service_free() connmand[8129]: src/ipconfig.c:__connman_ipconfig_unref_debug() 0xd16cc0 ref 0 by src/service.c::service_free() connmand[8129]: src/ipconfig.c:__connman_ipconfig_disable() ipconfig 0xd16cc0 connmand[8129]: src/ipconfig.c:__connman_ipconfig_unref_debug() 0xd16d20 ref 0 by src/service.c:4451:service_free() connmand[8129]: src/ipconfig.c:__connman_ipconfig_disable() ipconfig 0xd16d20 connmand[8129]: plugins/wifi.c:network_remove() network 0xd06ca0 connmand[8129]: src/network.c:connman_network_unref_debug() 0xd06ca0 name DIRECT-AP[TV][LG]32LN575S-ZE ref 1 by src/device.c:379:free_network() connmand[8129]: src/network.c:connman_network_unref_debug() 0xd06ca0 name DIRECT-AP[TV][LG]32LN575S-ZE ref 0 by plugins/wifi.c:766:remove_networks() connmand[8129]: src/network.c:network_destruct() network 0xd06ca0 name DIRECT-AP[TV][LG]32LN575S-ZE connmand[8129]: src/technology.c:__connman_technology_remove_device() device 0xcefd10 connmand[8129]: src/technology.c:technology_find() type 3 connmand[8129]: src/technology.c:technology_put() technology 0xcf3800 connmand[8129]: plugins/wifi.c:wifi_remove() device 0xcefd10 wifi 0xcf01f0 connmand[8129]: src/device.c:connman_device_set_powered() driver 0xcefd10 powered 0 connmand[8129]: src/technology.c:technology_find() type 3 connmand[8129]: src/device.c:connman_device_unref_debug() 0xcefd10 ref 1 by plugins/wifi.c:859:wifi_remove() connmand[8129]: src/rtnl.c:connman_rtnl_remove_watch() id 6 connmand[8129]: src/device.c:connman_device_unref_debug() 0xcefd10 ref 0 by src/detect.c:99:detect_dellink() connmand[8129]: src/device.c:device_destruct() device 0xcefd10 name Wireless
Re: [PATCH 2/3] network: fix eternal associating/connecting with IPv6-only
Hi, On Mon, 2015-02-09 at 10:40 +0200, pasi.sjoh...@jolla.com wrote: From: Pasi Sjöholm pasi.sjoh...@jollamobile.com It was possible with IPv6-only networks to have eternal associating/connecting variable set as true, especially when ipv4 configuration method was OFF. --- src/network.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/network.c b/src/network.c index db19cb9..d30520e 100644 --- a/src/network.c +++ b/src/network.c @@ -342,6 +342,8 @@ static int manual_ipv6_set(struct connman_network *network, connman_device_set_disconnected(network-device, false); + connman_network_set_associating(network, false); + network-connecting = false; This one looks fine. return 0; @@ -386,10 +388,6 @@ static int dhcpv6_set_addresses(struct connman_network *network) if (!service) goto err; - connman_network_set_associating(network, false); - - network-connecting = false; - ipconfig_ipv6 = __connman_service_get_ip6config(service); err = __connman_ipconfig_address_add(ipconfig_ipv6); if (err 0) @@ -511,6 +509,10 @@ static void check_dhcpv6(struct nd_router_advert *reply, if (service) { connman_service_create_ip6config(service, network-index); + network-connecting = false; + + connman_network_set_associating(network, false); + __connman_service_ipconfig_indicate_state(service, CONNMAN_SERVICE_STATE_CONFIGURATION, CONNMAN_IPCONFIG_TYPE_IPV6); We're not connected yet at this point, network-connecting can go false starting with dhcpv6_callback(). Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
Re: [RFC] ofono: Set ipconfig off if indicated that the protocol is not used
On Mon, 2015-02-09 at 11:45 +0200, Pasi Sjöholm wrote: And by this I mean the two lines below could be removed. :) +if (modem-active) +set_connected(modem); I'll remove those from the patch, thanks! Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
Online status
When a service transitions from ready to online status, connman makes an http request to ipv[4,6].connman.net/online/status.html. I have been asked if this is a requirement or is there a way to prevent this from happening? Tom ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
Re: Online status
Hi Tom, When a service transitions from ready to online status, connman makes an http request to ipv[4,6].connman.net/online/status.html. I have been asked if this is a requirement or is there a way to prevent this from happening? how else would you do it? You need to ensure that you are in fact connected to a working Internet connection. If you do not do it, then you will stay in ready stage. If that is good enough for you, then that is good enough. However things like NTP for example can not work in ready stage. We need to the confirmation that we actually do have a working Internet connection. Otherwise you are just link-local. So ready represented local network connectivity and online represent global network / Internet connectivity. Please note that this is similar on how OS X and also iOS are doing it these days. When it comes to WISPr support, then this HTTP request is actually mandatory. Regards Marcel ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
Re: Online status
On 2015-02-10 20:40, Marcel Holtmann wrote: Hi Tom, When a service transitions from ready to online status, connman makes an http request to ipv[4,6].connman.net/online/status.html. I have been asked if this is a requirement or is there a way to prevent this from happening? how else would you do it? You need to ensure that you are in fact connected to a working Internet connection. If you do not do it, then you will stay in ready stage. If that is good enough for you, then that is good enough. However things like NTP for example can not work in ready stage. We need to the confirmation that we actually do have a working Internet connection. Otherwise you are just link-local. So ready represented local network connectivity and online represent global network / Internet connectivity. Please note that this is similar on how OS X and also iOS are doing it these days. When it comes to WISPr support, then this HTTP request is actually mandatory. Is the URL configurable? Regards Marcel ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman -- Mit freundlichen Grüßen, / Best Regards, Sven Schwedas Systemadministrator TAO Beratungs- und Management GmbH | Lendplatz 45 | A - 8020 Graz Mail/XMPP: sven.schwe...@tao.at | +43 (0)680 301 7167 http://software.tao.at signature.asc Description: OpenPGP digital signature ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
1.26 dnsproxy's domain removal is incompatible with certain DNS servers' answers
1.26 src/dnsproxy.c fails to process (probably CNAME) answers from certain types of external DNS servers, and thus it cannot resolve host-only queries such as www at all or at least correctly depending on the answer content and format. If the default domain list has company.com, it is expected to be resolved as if it were a www.company.com query, but dnsproxy cannot perform this with certain types of external DNS servers. This may be related to the following threads: https://lists.connman.net/pipermail/connman/2014-July/017338.html https://lists.connman.net/pipermail/connman/2014-July/017340.html https://lists.connman.net/pipermail/connman/2014-July/017346.html I found answer messages from two versions of BIND fail in different modes: BIND 9.3.2's answer is misjudged as a Corrupted packet probably because strip_domain() unexpectedly encounters a compressed label (i.e. 0xc000+offset) (in an NS record?). BIND 9.7.3's answer is ignored and discarded because it contains a dns_type of ns_t_ns, which uncompress() ignores and discards. Both of the Linux BIND servers above have been in production use for several years with no unhappy resolvers (except connmand) as far as I know. I found a corporate Windows DNS server is compatible with connman-1.26 and partial domains are resolved expectedly. Furthermore, ns_resolv() appends search domains and submits additional queries only if the original query is for a single-label partial domain such as www. This seems to disagree with glibc getaddrinfo(3) with resolv.conf having a domain/search directive, which always submits queries for the original and domain-appended domains to the external DNS server(s) regardless of the original query (multi- or single-label). This appears more reasonable for resolving multi-label partial domains such as host.zone with a default domain of company.com. I notice that getaddrinfo(3) even submits www.company.com and www.company.com.company.com queries if the original query is for www.company.com (i.e. FQDN) and resolv.conf's domain/search directive has company.com in its list. The attached Quick-n-Dirty(TM) patch, when proxy failures mentioned above are detected, makes connmand fall back to nodnsproxy mode and rewrites resolv.conf so that resolvers will later query directly to external DNS servers (proxy mode is preferred and the default, if possible, for its internal cache). hiro diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 5ddb813..51a44ee 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -1865,6 +1865,9 @@ static char *uncompress(int16_t field_count, char *start, char *end, */ len_ptr[0] = total_len 8; len_ptr[1] = total_len 0xff; + } else { + restart_noproxy(); + goto out; } *uncompressed_ptr = uptr; @@ -1915,6 +1918,8 @@ static int strip_domains(char *name, char *answers, int maxlen) return end - start; } +extern void restart_noproxy(void); + static int forward_dns_reply(unsigned char *reply, int reply_len, int protocol, struct server_data *data) { @@ -2080,6 +2085,7 @@ static int forward_dns_reply(unsigned char *reply, int reply_len, int protocol, uptr - answers); if (new_len 0) { DBG(Corrupted packet); + restart_noproxy(); return -EINVAL; } diff --git a/src/resolver.c b/src/resolver.c index 01e7c0e..c0c1076 100644 --- a/src/resolver.c +++ b/src/resolver.c @@ -91,6 +91,12 @@ static int resolvfile_export(void) content = g_string_new(# Generated by Connection Manager\n); + if (dnsproxy_enabled) {/* Bypass all the crappy stuff. */ + g_string_append_printf(content, + nameserver 127.0.0.1\nnameserver ::1\n); + goto put; + } + /* * Domains and nameservers are added in reverse so that the most * recently appended entry is the primary one. No more than @@ -127,7 +133,7 @@ static int resolvfile_export(void) entry-server); count++; } - +put: old_umask = umask(022); fd = open(/etc/resolv.conf, O_RDWR | O_CREAT | O_CLOEXEC, @@ -157,6 +163,19 @@ done: return err; } +void restart_noproxy(void) +{ + int index = connman_inet_ifindex(lo); + + if (!dnsproxy_enabled) + return; + + __connman_resolvfile_remove(index, NULL, ::1); + __connman_resolvfile_remove(index, NULL, 127.0.0.1); + dnsproxy_enabled = false; + resolvfile_export(); +} + int __connman_resolvfile_append(int index, const char *domain, const char *server) { @@ -229,7 +248,7 @@ static void append_fallback_nameservers(void) if (dnsproxy_enabled) { __connman_dnsproxy_append(entry-index, entry-domain, entry-server); - } else { + } /*else*/ { __connman_resolvfile_append(entry-index, entry-domain, entry-server); } @@ -251,7 +270,7 @@ static void remove_fallback_nameservers(void) if (dnsproxy_enabled) { __connman_dnsproxy_remove(entry-index, entry-domain, entry-server); - } else { + } /*else*/ { __connman_resolvfile_remove(entry-index, entry-domain, entry-server); }