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: [PATCH 06/11] resolve: musl does not implement res_ninit
(Burton, Ross)
2. [PATCH] Fix some warnings due to GCC8's cast-function-type
(Peter Meerwald-Stadler)
3. RE: Wrong state of a service if only IPv6 is enabled
(Marek Szanyi)
----------------------------------------------------------------------
Message: 1
Date: Wed, 3 Oct 2018 11:52:47 +0100
From: "Burton, Ross" <[email protected]>
To: [email protected]
Subject: Re: [PATCH 06/11] resolve: musl does not implement res_ninit
Message-ID:
<CAJTo0LaOoXbCNP=88SeFpu=gdturo4aq-6tbas98-e8sk9v...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Whoops, meant to strip this before sending. Ignore this patch for now.
Ross
On Wed, 3 Oct 2018 at 11:51, Ross Burton <[email protected]> wrote:
>
> From: Khem Raj <[email protected]>
>
> ported from
> http://git.alpinelinux.org/cgit/aports/plain/testing/connman/libresolv.patch
>
> Upstream-Status: Pending
>
> Signed-off-by: Khem Raj <[email protected]>
> Signed-off-by: Ross Burton <[email protected]>
> ---
> gweb/gresolv.c | 34 +++++++++++++---------------------
> 1 file changed, 13 insertions(+), 21 deletions(-)
>
> diff --git a/gweb/gresolv.c b/gweb/gresolv.c
> index 38a554e0..a9e87402 100644
> --- a/gweb/gresolv.c
> +++ b/gweb/gresolv.c
> @@ -36,6 +36,7 @@
> #include <arpa/inet.h>
> #include <arpa/nameser.h>
> #include <net/if.h>
> +#include <ctype.h>
>
> #include "gresolv.h"
>
> @@ -877,8 +878,6 @@ GResolv *g_resolv_new(int index)
> resolv->index = index;
> resolv->nameserver_list = NULL;
>
> - res_ninit(&resolv->res);
> -
> return resolv;
> }
>
> @@ -918,8 +917,6 @@ void g_resolv_unref(GResolv *resolv)
>
> flush_nameservers(resolv);
>
> - res_nclose(&resolv->res);
> -
> g_free(resolv);
> }
>
> @@ -1022,24 +1019,19 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const
> char *hostname,
> debug(resolv, "hostname %s", hostname);
>
> if (!resolv->nameserver_list) {
> - int i;
> -
> - for (i = 0; i < resolv->res.nscount; i++) {
> - char buf[100];
> - int family = resolv->res.nsaddr_list[i].sin_family;
> - void *sa_addr = &resolv->res.nsaddr_list[i].sin_addr;
> -
> - if (family != AF_INET &&
> - resolv->res._u._ext.nsaddrs[i]) {
> - family = AF_INET6;
> - sa_addr =
> &resolv->res._u._ext.nsaddrs[i]->sin6_addr;
> + FILE *f = fopen("/etc/resolv.conf", "r");
> + if (f) {
> + char line[256], *s;
> + int i;
> + while (fgets(line, sizeof(line), f)) {
> + if (strncmp(line, "nameserver", 10) ||
> !isspace(line[10]))
> + continue;
> + for (s = &line[11]; isspace(s[0]); s++);
> + for (i = 0; s[i] && !isspace(s[i]); i++);
> + s[i] = 0;
> + g_resolv_add_nameserver(resolv, s, 53, 0);
> }
> -
> - if (family != AF_INET && family != AF_INET6)
> - continue;
> -
> - if (inet_ntop(family, sa_addr, buf, sizeof(buf)))
> - g_resolv_add_nameserver(resolv, buf, 53, 0);
> + fclose(f);
> }
>
> if (!resolv->nameserver_list)
> --
> 2.11.0
>
------------------------------
Message: 2
Date: Wed, 3 Oct 2018 16:10:05 +0200
From: Peter Meerwald-Stadler <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH] Fix some warnings due to GCC8's cast-function-type
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
Reported by Ross Burton
gweb/giognutls.c: In function ?g_io_gnutls_dispatch?:
gweb/giognutls.c:307:17: error: cast between incompatible function types from
?GSourceFunc? {aka ?int (*)$
tools/session-utils.c: In function ?util_test_add?:
tools/session-utils.c:234:4: error: cast between incompatible function types
from ?void (*)(const void *)$
(GTestFixtureFunc) run_test_cb,
tools/session-utils.c:235:4: error: cast between incompatible function types
from ?void (*)(void *)? to ?$
(GTestFixtureFunc) g_free);
---
gweb/giognutls.c | 2 +-
tools/session-utils.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/gweb/giognutls.c b/gweb/giognutls.c
index c029a8b0..b5c476cb 100644
--- a/gweb/giognutls.c
+++ b/gweb/giognutls.c
@@ -304,7 +304,7 @@ static gboolean g_io_gnutls_dispatch(GSource *source,
GSourceFunc callback,
gpointer user_data)
{
GIOGnuTLSWatch *watch = (GIOGnuTLSWatch *) source;
- GIOFunc func = (GIOFunc) callback;
+ GIOFunc func = (GIOFunc) (void (*) (void)) callback;
GIOCondition condition = watch->pollfd.revents;
DBG("source %p condition %u", source, condition);
diff --git a/tools/session-utils.c b/tools/session-utils.c
index 51cec5c3..77485f7c 100644
--- a/tools/session-utils.c
+++ b/tools/session-utils.c
@@ -26,6 +26,7 @@
#include <stdlib.h>
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#pragma GCC diagnostic ignored "-Wcast-function-type"
#include <gdbus.h>
--
2.19.0
------------------------------
Message: 3
Date: Wed, 3 Oct 2018 14:26:17 +0000
From: Marek Szanyi <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: RE: Wrong state of a service if only IPv6 is enabled
Message-ID:
<47f3088e9b0a4140b7c47e41dc12f9f719dea...@kihagwinex01.int.kistler.com>
Content-Type: text/plain; charset="us-ascii"
Hi Daniel,
Yes, I was using the D-Bus API. To be more specific, I have used the
SetProperty function from net.connman.Service object and simply set "Method" to
"off" for IPv4 configuration.
Kind Regards,
Marek Szanyi
> -----Original Message-----
> From: Daniel Wagner [mailto:[email protected]]
> Sent: Tuesday, October 02, 2018 8:58 AM
> To: Szanyi Marek
> Cc: [email protected]
> Subject: Re: Wrong state of a service if only IPv6 is enabled
>
> Hi Marek,
>
> On Wed, Sep 26, 2018 at 11:31:31AM +0000, Marek Szanyi wrote:
> > I have a device running connman v 1.35. For the Ethernet service if
> > IPv4 is enabled or both IPv4 and IPv6 is enabled the state of the
> > Ethernet service is reported correctly. Because the device have
> > internet access the state is "online". However if I disable IPv4 and
> > leave only IPv6 enabled the state of the service reported by connman
> > is "idle", which is wrong, because I still have internet access
> > (verified by using curl). Is this an expected behavior or is this a
> > bug in connman?
>
> I would expect that the state should remain in online if IPv6 is still
> up. How do you disable IPv4? Is it via ConnMan's D-Bus API?
>
> Thanks,
> Daniel
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 36, Issue 5
**************************************