Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. Re: Failed to create storage directory: No such file or
      directory (Jussi Laakkonen)
   2. Re: [PATCH 1/1] service: Start online check on IP address
      update (Robert Tiemann)
   3. [PATCH v2 0/1] Start online check on IP address update
      (Robert Tiemann)
   4. [PATCH v2 1/1] service: Start online check on IP address
      update (Robert Tiemann)
   5. dnsproxy: invalid answer where there are no DNS servers
      available (Nuno Gon?alves)


----------------------------------------------------------------------

Message: 1
Date: Thu, 28 Mar 2019 12:07:43 +0200
From: Jussi Laakkonen <[email protected]>
To: Daniel Wagner <[email protected]>, JH <[email protected]>
Cc: connman <[email protected]>
Subject: Re: Failed to create storage directory: No such file or
        directory
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed

Hi Daniel

On 3/27/19 9:24 PM, Daniel Wagner wrote:
> Hi Jussi,
> 
> On 3/27/19 9:31 AM, Jussi Laakkonen wrote:
>> Yes, finding out these things with iptables takes time :) We have now 
>> iptables 1.8.2 in use and as of now it seems that patch I mentioned in 
>> [2] is no longer necessary. It applied only for iptables 1.6.1 (and 
>> most likely, for 1.6.x).
> 
> Thanks for letting us know!
> 
> Maybe we should update the dependency to iptables 1.8.2 in this case. 
> Currently, we ask for 1.4.11 which pretty old release from 26.05.2011.
> 
> 1.4.21 released on 22.11.2013
> 1.6.1? released on 02.02.2018
> 1.8.0? released on 07.07.2018
> 1.8.1? released on 23.10.2018
> 1.8.2? releases on 13.11.2018
> 
> Aehm, not sure what to do though... 5 years nothing end then a lot of 
> updates. I don't think many distros have picked up the latest version 
> yet. My Fedora 29 ships 1.8.0.
> 

Well, upping the requirement is quite tricky as we also noticed. 
Iptables 1.8.2 (and I'm guessing rest of the 1.8.x) will require newer 
kernel headers that are available with 4.2.8. Unless the system is 
running fairly up-to-date kernel it requires another patch for the 
kernel headers.

My Debian, for example, seems to use 1.6.1 still, which we had also used 
with older 3.x kernels without any problems. Except when we started to 
use iptables for IPv6 as well via ConnMan (I should make these firewall 
changes into a separate plugin and try to upstream it someday) we needed 
to patch iptables.

Upping the version requirement would anyways require some patching on 
systems running older versions of kernel or iptables. Depending on the 
use of course :).

- Jussi


------------------------------

Message: 2
Date: Thu, 28 Mar 2019 12:26:42 +0100
From: Robert Tiemann <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 1/1] service: Start online check on IP address
        update
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

On 3/27/19 8:31 AM, Daniel Wagner wrote:
> Hi Robert,

Hi,

thank you for your feedback!

>> +static void start_online_check(struct connman_service *service,
>> +                            enum connman_ipconfig_type type)
>> +{
>> +    if (connman_setting_get_bool("EnableOnlineCheck"))
>> +            if (type == CONNMAN_IPCONFIG_TYPE_IPV4) {
>> +                    check_proxy_setup(service);
>> +            } else {
>> +                    __connman_service_wispr_start(service, type);
>> +            }
>> +    else
>> +            connman_info("Online check disabled. "
>> +                    "Default service remains in READY state.");
>> +}
>> +
>
> I think we should cancel any pending online check first. Just checked
> the wispr file and it looks like we could trigger an online check
> while one is running. Probably a bad thing.

True. I have revised my patch and will send a new version later this
day.

> Thanks,
> Daniel

Cheers,
Robert


------------------------------

Message: 3
Date: Thu, 28 Mar 2019 13:16:56 +0100
From: Robert Tiemann <[email protected]>
To: [email protected]
Subject: [PATCH v2 0/1] Start online check on IP address update
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

Differences between v1 and v2:

- Start of online check has been removed from
  __connman_service_ipconfig_indicate_state() in v2, the only call of
  start_online_check() is in address_updated(). The reasoning behind
  this is that it only makes sense to check the online state if there is
  an IP address assigned, so address_updated() seems to be the
  appropriate place. Moreover, start_online_check() was frequently
  called twice in v1 because of a state change followed by an IP address
  update.

- There is a call of cancel_online_check() inside start_online_check()
  to avoid multiple simultaneous starts of online check which could have
  caused resource leaks.

- Function check_proxy_setup() returns true if the caller should call
  __connman_service_wispr_start(). This was done to make sure that
  __connman_service_wispr_start() is always called after
  cancel_online_check() inside start_online_check().

- Function start_online_check() uses early return for better
  readability.

Robert Tiemann (1):
  service: Start online check on IP address update

 src/service.c | 40 +++++++++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 17 deletions(-)

--
2.17.1


------------------------------

Message: 4
Date: Thu, 28 Mar 2019 13:18:02 +0100
From: Robert Tiemann <[email protected]>
To: [email protected]
Subject: [PATCH v2 1/1] service: Start online check on IP address
        update
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

This patch enables ConnMan to enter online state after getting IP
configuration via DHCP when coming from an IPV4LL configuration.
---
 src/service.c | 40 +++++++++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 17 deletions(-)

diff --git a/src/service.c b/src/service.c
index 3202f26c..0d081755 100644
--- a/src/service.c
+++ b/src/service.c
@@ -144,6 +144,8 @@ static struct connman_ipconfig *create_ip4config(struct 
connman_service *service
 static struct connman_ipconfig *create_ip6config(struct connman_service 
*service,
                int index);
 static void dns_changed(struct connman_service *service);
+static void start_online_check(struct connman_service *service,
+                               enum connman_ipconfig_type type);

 struct find_data {
        const char *path;
@@ -1395,6 +1397,7 @@ static void address_updated(struct connman_service 
*service,
                        service == connman_service_get_default()) {
                nameserver_remove_all(service, type);
                nameserver_add_all(service, type);
+               start_online_check(service, type);

                __connman_timeserver_sync(service);
        }
@@ -5927,7 +5930,7 @@ enum connman_service_state 
__connman_service_ipconfig_get_state(
        return CONNMAN_SERVICE_STATE_UNKNOWN;
 }

-static void check_proxy_setup(struct connman_service *service)
+static bool check_proxy_setup(struct connman_service *service)
 {
        /*
         * We start WPAD if we haven't got a PAC URL from DHCP and
@@ -5936,23 +5939,20 @@ static void check_proxy_setup(struct connman_service 
*service)
         */

        if (service->proxy != CONNMAN_SERVICE_PROXY_METHOD_UNKNOWN)
-               goto done;
+               return true;

        if (service->proxy_config != CONNMAN_SERVICE_PROXY_METHOD_UNKNOWN &&
                (service->proxy_config != CONNMAN_SERVICE_PROXY_METHOD_AUTO ||
                        service->pac))
-               goto done;
+               return true;

        if (__connman_wpad_start(service) < 0) {
                service->proxy = CONNMAN_SERVICE_PROXY_METHOD_DIRECT;
                __connman_notifier_proxy_changed(service);
-               goto done;
+               return true;
        }

-       return;
-
-done:
-       __connman_service_wispr_start(service, CONNMAN_IPCONFIG_TYPE_IPV4);
+       return false;
 }

 /*
@@ -6078,6 +6078,21 @@ static void cancel_online_check(struct connman_service 
*service)
        connman_service_unref(service);
 }

+static void start_online_check(struct connman_service *service,
+                               enum connman_ipconfig_type type)
+{
+       if (!connman_setting_get_bool("EnableOnlineCheck")) {
+               connman_info("Online check disabled. "
+                       "Default service remains in READY state.");
+               return;
+       }
+
+       if (type != CONNMAN_IPCONFIG_TYPE_IPV4 || check_proxy_setup(service)) {
+               cancel_online_check(service);
+               __connman_service_wispr_start(service, type);
+       }
+}
+
 int __connman_service_ipconfig_indicate_state(struct connman_service *service,
                                        enum connman_service_state new_state,
                                        enum connman_ipconfig_type type)
@@ -6147,15 +6162,6 @@ int __connman_service_ipconfig_indicate_state(struct 
connman_service *service,
        case CONNMAN_SERVICE_STATE_CONFIGURATION:
                break;
        case CONNMAN_SERVICE_STATE_READY:
-               if (connman_setting_get_bool("EnableOnlineCheck"))
-                       if (type == CONNMAN_IPCONFIG_TYPE_IPV4) {
-                               check_proxy_setup(service);
-                       } else {
-                               __connman_service_wispr_start(service, type);
-                       }
-               else
-                       connman_info("Online check disabled. "
-                               "Default service remains in READY state.");
                if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
                        service_rp_filter(service, true);
                set_mdns(service, service->mdns_config);
--
2.17.1



------------------------------

Message: 5
Date: Thu, 28 Mar 2019 14:40:32 +0100
From: Nuno Gon?alves <[email protected]>
To: [email protected]
Subject: dnsproxy: invalid answer where there are no DNS servers
        available
Message-ID:
        <caexmxlt2nxo_uu-5p7pkt-ag2v9bnzji97dbvtezpjhb1ps...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Hi,

Typing "ping abcd", where abcd does not exist on /etc/hosts or in the
search domains, will usually hang for a while with Connman.

I've compared with other systems and my conclusion is that libnss_dns
is retrying the DNS request to connman, since connman answer does not
include the query field.

This behaviour comes from [1], where both a invalid Query and no
upstream servers are handled in the same way.

I believe the query field must be part of the answer when the Query
message was valid, but just happens to not be possible to resolve.

Thanks,
Nuno

[1] 
https://git.kernel.org/pub/scm/network/connman/connman.git/tree/src/dnsproxy.c#n3514


------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 41, Issue 31
***************************************

Reply via email to