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 v2 2/3] Fix unclean shutdown with proxy_disable
(Daniel Wagner)
2. Re: [PATCH v2 3/3] Pull pacrunner forward to mozjs38
(Daniel Wagner)
3. Re: [PATCH] rtnl: retry to add ether interface after renaming
(Daniel Wagner)
4. Re: [PATCH v2 0/4] session: fix missing snat and firewall
updates (Daniel Wagner)
5. Re: [PATCH] nat: Set file offset back to 0 before writing
ip_forward (Daniel Wagner)
----------------------------------------------------------------------
Message: 1
Date: Mon, 24 Apr 2017 20:37:20 +0200
From: Daniel Wagner <[email protected]>
To: Jeremy Linton <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: [PATCH v2 2/3] Fix unclean shutdown with proxy_disable
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Jeremy,
Please prefix this one with 'proxy'.
On 04/19/2017 07:24 PM, Jeremy Linton wrote:
> The proxy disable code calls set_proxy and clears the
> context structure, which results in the mosjs_clear_proxy
> not being called. Also there is a memory leak in the glist
> due to use of remove_link() rather than remove(). The former
> simply removes the entry from the linked list but doesn't free
> it.
>
> Signed-off-by: Jeremy Linton <[email protected]>
No SoB needed.
Thanks,
Daniel
> ---
> src/proxy.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/proxy.c b/src/proxy.c
> index 7579887..88bfc2c 100644
> --- a/src/proxy.c
> +++ b/src/proxy.c
> @@ -444,9 +444,11 @@ int pacrunner_proxy_disable(struct pacrunner_proxy
> *proxy)
>
> pthread_mutex_lock(&proxy_mutex);
> proxy_list = g_list_remove_link(proxy_list, list);
> + g_list_free(list); //must manually delete entry when
> g_link_remove_link()
> + //is used instead of g_link_remove()
We do old style C comments.
> pthread_mutex_unlock(&proxy_mutex);
>
> - __pacrunner_js_set_proxy(NULL);
> + __pacrunner_js_clear_proxy(proxy);
>
> pacrunner_proxy_unref(proxy);
>
Thanks,
Daniel
------------------------------
Message: 2
Date: Mon, 24 Apr 2017 20:45:30 +0200
From: Daniel Wagner <[email protected]>
To: Jeremy Linton <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: [PATCH v2 3/3] Pull pacrunner forward to mozjs38
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Jeremy,
[ I was applying all the patches (fixed up those nitpickings I listed)
but this one needs more 'love' ]
Please prefix with 'build'.
On 04/19/2017 07:24 PM, Jeremy Linton wrote:
> Mozjs185 is getting really old and unsupported. Newer versions
> of the mozjs JSAPI are C++ based. So we convert the plugin to
> C++ and then apply necessarily API changes so that it can be built
> with the more recent mozjs38. For example we now need to "root"
> values being passed into the API in order to satisfy the JSAPI
> garbage collection rules. Further, a number of the APIs have been
> tweaked and moved into the JS namespace, so we namespace them
> appropriately and adjust their parameters.
>
> Signed-off-by: Jeremy Linton <[email protected]>
Again no SoB.
> ---
> Makefile.am | 15 +++---
> configure.ac | 4 +-
> plugins/{mozjs.c => mozjs.cc} | 109
> ++++++++++++++++++++++--------------------
> 3 files changed, 68 insertions(+), 60 deletions(-)
> rename plugins/{mozjs.c => mozjs.cc} (59%)
>
> diff --git a/Makefile.am b/Makefile.am
> index ee84b75..65cc8c9 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -31,9 +31,10 @@ endif
> if MOZJS
> js_sources = src/js_funcs.c
> builtin_modules += mozjs
> -builtin_sources += plugins/mozjs.c
> -builtin_cflags += @MOZJS_CFLAGS@
> -builtin_libadd += @MOZJS_LIBS@
> +builtin_libadd += plugins/libmozjsplugin.a @MOZJS_LIBS@ -lstdc++
> +noinst_LIBRARIES += plugins/libmozjsplugin.a
> +plugins_libmozjsplugin_a_SOURCES = plugins/mozjs.cc
> +plugins_libmozjsplugin_a_CXXFLAGS = $(AM_CFLAGS) @MOZJS_CFLAGS@
> @DBUS_CFLAGS@ @GLIB_CFLAGS@
> endif
>
> if V8
> @@ -137,16 +138,16 @@ unit_test_pacrunner_LDADD += @CURL_LIBS@
> endif
>
> if MOZJS
> -unit_test_pacrunner_SOURCES += plugins/mozjs.c
> -
> +unit_test_pacrunner_SOURCES += plugins/mozjs.cc
> +unit_test_pacrunner_CXXFLAGS = $(AM_CFLAGS) @MOZJS_CFLAGS@
> unit_test_pacrunner_LDADD += @MOZJS_LIBS@ @PTHREAD_LIBS@
>
> noinst_PROGRAMS += unit/test-mozjs
>
> unit_test_mozjs_SOURCES = unit/test-mozjs.c src/pacrunner.h \
> src/proxy.c src/manual.c src/download.c \
> - src/js.c plugins/mozjs.c $(js_sources)
> -
> + src/js.c plugins/mozjs.cc $(js_sources)
> +unit_test_mozjs_CXXFLAGS = $(AM_CFLAGS) @MOZJS_CFLAGS@
> unit_test_mozjs_LDADD = @MOZJS_LIBS@ @GLIB_LIBS@ @PTHREAD_LIBS@
> endif
>
> diff --git a/configure.ac b/configure.ac
> index 888c873..b2565c0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -76,8 +76,8 @@ AM_CONDITIONAL(DUKTAPE, test "${enable_duktape}" = "yes")
> AC_ARG_ENABLE(mozjs, AC_HELP_STRING([--enable-mozjs],
> [enable Mozilla Javascript plugin support]))
> if (test "${enable_mozjs}" = "yes"); then
> - PKG_CHECK_MODULES(MOZJS, mozjs185, dummy=yes,
> - AC_MSG_ERROR(Mozilla Javascript >= 1.8 is required))
> + PKG_CHECK_MODULES(MOZJS, mozjs-38, dummy=yes,
> + AC_MSG_ERROR(Mozilla Javascript >= 38 is required))
I have installed mozjs-45-devel on my Fedora 25 system and it was not
recognized. It worked with mozjs-38 though. I am always strangling with
the version checks. So I don't know how to test this correctly.
The final result seems to do work. I don't have the right environment to
test but at least it builds and the unit test are signally okay.
Thanks,
Daniel
------------------------------
Message: 3
Date: Mon, 24 Apr 2017 20:49:39 +0200
From: Daniel Wagner <[email protected]>
To: Dmitry Rozhkov <[email protected]>,
[email protected]
Subject: Re: [PATCH] rtnl: retry to add ether interface after renaming
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Dmitry,
On 04/20/2017 03:48 PM, Dmitry Rozhkov wrote:
> If eth* interfaces are blacklisted to avoid a race condition
> where connman may access an interface before systemd/udev can
> change it to use a predictable interface name then it's impossible
> to re-activate it under a new predictable name because an existing
> interface is considered to be already added to the technology.
>
> Once blacklisted an interface is not re-evaluated under a new name.
>
> This patch allows to re-evaluate an interface known to connman for
> adding it to the ethernet technology in case it's name has changed.
> E.g. after unplugging a cable and plugging it back.
>
> Signed-off-by: Dmitry Rozhkov <[email protected]>
We don't do SoB in ConnMan.
Patch applied.
Thanks,
Daniel
------------------------------
Message: 4
Date: Mon, 24 Apr 2017 20:55:32 +0200
From: Daniel Wagner <[email protected]>
To: Lukasz Nowak <[email protected]>, [email protected]
Subject: Re: [PATCH v2 0/4] session: fix missing snat and firewall
updates
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Lukasz,
On 04/24/2017 06:05 PM, Lukasz Nowak wrote:
> From: Lukasz Nowak <[email protected]>
>
> Changes since v1:
> - two additional patches fixing problems observed after dhcp lease expiration
>
> Two scenarios have been found where session would not update all tables
> it manages:
> - snat not removed after a disconnect
> - snat and firewall mark not updated after ip config change
All patches applied.
Thanks,
Daniel
------------------------------
Message: 5
Date: Mon, 24 Apr 2017 20:56:16 +0200
From: Daniel Wagner <[email protected]>
To: [email protected]
Subject: Re: [PATCH] nat: Set file offset back to 0 before writing
ip_forward
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
[cc Neil]
On 04/24/2017 08:18 PM, Daniel Wagner wrote:
> Kernel versions >= 4.5 have changed the default behavior[1] for file
> offset handling on crop/says fs to strict write position handling:
>
> Respect file position when writing sysctl strings. Multiple writes
> will append to the sysctl value buffer. Anything past the max length
> of the sysctl value buffer will be ignored. Writes to numeric sysctl
> entries must always be at file position 0 and the value must be
> fully contained in the buffer sent in the write syscall.
>
> We first read from /proc/sys/net/ipv4/ip_forward before writing to the
> file. Without the lseek to 0 first the write is silentenly ignored.
>
> Bug report from Neil MacLeod <[email protected]>.
>
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=41662f5cc55335807d39404371cfcbb1909304c4
> ---
>
> Hi,
>
> I have 'written' this version of the fix. Mostly pimped the commit
> message and added error handling to Neil's version.
>
> @Neil: I hope that is okay with you.
>
> cheers,
> Daniel
>
> src/nat.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/nat.c b/src/nat.c
> index 4c1f8583d2f1..fb557101ea31 100644
> --- a/src/nat.c
> +++ b/src/nat.c
> @@ -54,6 +54,9 @@ static int enable_ip_forward(bool enable)
> if (!value) {
> if (read(f, &value, sizeof(value)) < 0)
> value = 0;
> +
> + if (lseek(f, 0, SEEK_SET) < 0)
> + return -errno;
> }
>
> if (enable) {
>
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 18, Issue 20
***************************************