Re: [PATCH 2/3] systemd: Use environment file for connmand debug options

2013-03-13 Thread Kok, Auke-jan H
On Wed, Mar 13, 2013 at 9:36 AM, Marcel Holtmann wrote: >> src/connman.service.in | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/src/connman.service.in b/src/connman.service.in >> index 2e9e4d5..fa57d4e 100644 >> --- a/src/connman.service.in >> +++ b/src/connman.servi

Re: [PATCH 2/3] systemd: Use environment file for connmand debug options

2013-03-13 Thread Marcel Holtmann
Hi Jukka, > src/connman.service.in | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/connman.service.in b/src/connman.service.in > index 2e9e4d5..fa57d4e 100644 > --- a/src/connman.service.in > +++ b/src/connman.service.in > @@ -6,7 +6,8 @@ After=syslog.target > Type=d

Re: [PATCH 0/5] Add current git HEAD commit id to version prints

2013-03-13 Thread Marcel Holtmann
Hi Jukka, > there was someone in irc/ml missing information about what is > the git HEAD commit id of the connman sources when the binary was > built. I have been also missing this information lately so decided > to generate this piece of data. > > Cheers, > Jukka > > > Jukka Rissanen (5): > b

[PATCH v0 10/10] test-iptables: Add firewall API tests

2013-03-13 Thread Daniel Wagner
From: Daniel Wagner --- Makefile.am | 2 +- tools/iptables-unit.c | 95 +++ 2 files changed, 90 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4c99ff5..78b1b33 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3

[PATCH v0 09/10] firewall: Maintain iptables rules in dedicated ConnMan chains

2013-03-13 Thread Daniel Wagner
From: Daniel Wagner Instead appending ConnMan iptables rules into the builtin chains we append them into chains managed by ConnMan. If a rule needs to be inserted into a bultin chain, ConnMan will create a 'connman-' prefixed builtin chain name and appends the user rules there. Then ConnMan will

[PATCH v0 07/10] firewall: Flush managed chains

2013-03-13 Thread Daniel Wagner
From: Daniel Wagner ConnMan maintains its own chain per builtin chain. The managed chain have a prefix 'connman-' and one rule in the corresponding builtin chain which jumps uncoditional to the managed chain. In case ConnMan crashed we need to cleanup first. --- src/firewall.c | 107 +++

[PATCH v0 08/10] firewall: Add firewall API

2013-03-13 Thread Daniel Wagner
From: Daniel Wagner The main idea behind this API is to collect several iptables rules together and enable or disable in one go. For this a context is created via __connman_firewall_create() and the rules added to this context via __connman_firewall_add_rule(). In order to append all rules __co

[PATCH v0 05/10] iptables: Add chain iterator

2013-03-13 Thread Daniel Wagner
From: Daniel Wagner We will implement the ConnMan iptables specific part in a different file and leave the iptables.c file as small as possible. Therefore, we move the flushing part out, but we need a way to find our chains on bootup (left over from a crash). Let's add an interater which walks o

[PATCH v0 06/10] firewall: Add firewall file

2013-03-13 Thread Daniel Wagner
From: Daniel Wagner --- Makefile.am| 2 +- src/connman.h | 4 src/firewall.c | 38 ++ src/main.c | 2 ++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 src/firewall.c diff --git a/Makefile.am b/Makefile.am index d54c693.

[PATCH v0 03/10] iptables-test: Add insert support

2013-03-13 Thread Daniel Wagner
From: Daniel Wagner --- tools/iptables-test.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/iptables-test.c b/tools/iptables-test.c index f20404b..1d964b9 100644 --- a/tools/iptables-test.c +++ b/tools/iptables-test.c @@ -30,6 +30,7 @@ enum iptables_c

[PATCH v0 02/10] iptables: Add __connman_iptables_insert()

2013-03-13 Thread Daniel Wagner
From: Daniel Wagner This was wrongly removed with commit 161efbae --- src/connman.h | 3 +++ src/iptables.c | 74 ++ 2 files changed, 77 insertions(+) diff --git a/src/connman.h b/src/connman.h index 9a607fb..8e26304 100644 --- a/src/con

[PATCH v0 04/10] connman: Add callback helpers

2013-03-13 Thread Daniel Wagner
From: Daniel Wagner There is a common pattern when writing a callback function. Let's add a few helper for this. This is shamelessly stolen from oFono. --- include/types.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/types.h b/include/types.h index 0f671ec..0

[PATCH v0 00/10] Add 'firewall' support

2013-03-13 Thread Daniel Wagner
From: Daniel Wagner Hi, This series is based on "[PATCH v7] iptables refactoring" series. The orignal title of this series was "[PATCH v0 00/16] Managed iptables API". The first two patches bring back __connman_iptables_insert() which is needed for patch #9. Patch #3 just adds support for '-I'

[PATCH v0 01/10] iptables: Tell prepare_rule_inclusion() rule position

2013-03-13 Thread Daniel Wagner
From: Daniel Wagner prepare_rule_inclusion() is currently working correct for APPEND operations. First let's have a look what it does currently: - user chains will be ignored by this change, because it head->builtin flag is always -1. - For builtin chains there are two cases to look at -- cha

[PATCH 5/5] main: Print git HEAD commit id if known in -v option

2013-03-13 Thread Jukka Rissanen
--- src/main.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index e21d056..9787a31 100644 --- a/src/main.c +++ b/src/main.c @@ -36,6 +36,7 @@ #include #include +#include #include "connman.h" @@ -562,7 +563,10 @@ int main(int argc, cha

[PATCH 4/5] log: Print current git HEAD commit id when log is initialized

2013-03-13 Thread Jukka Rissanen
If the commit id is not known, the print only the version number. --- src/log.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/log.c b/src/log.c index 4e305a9..f73c638 100644 --- a/src/log.c +++ b/src/log.c @@ -33,6 +33,7 @@ #include #include +#include #inclu

[PATCH 3/5] build: Try to create include/connman-git-commit.h file

2013-03-13 Thread Jukka Rissanen
--- Makefile.am | 13 ++--- configure.ac | 3 ++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 9fc159c..a6c9b73 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,7 @@ include_HEADERS = include/types.h include/log.h include/plugin.

[PATCH 2/5] gitignore: Ignore the generated include/connman-git-commit.h

2013-03-13 Thread Jukka Rissanen
--- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8dd554d..92f0a3c 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ autom4te.cache connman.pc include/connman include/version.h +include/connman-git-commit.h src/builtin.h src/connmand sr

[PATCH 0/5] Add current git HEAD commit id to version prints

2013-03-13 Thread Jukka Rissanen
Hi, there was someone in irc/ml missing information about what is the git HEAD commit id of the connman sources when the binary was built. I have been also missing this information lately so decided to generate this piece of data. Cheers, Jukka Jukka Rissanen (5): build: Script to generate cu

[PATCH 1/5] build: Script to generate current git HEAD commit id

2013-03-13 Thread Jukka Rissanen
--- src/gen-git-commit | 32 1 file changed, 32 insertions(+) create mode 100755 src/gen-git-commit diff --git a/src/gen-git-commit b/src/gen-git-commit new file mode 100755 index 000..7f1898a --- /dev/null +++ b/src/gen-git-commit @@ -0,0 +1,32 @@ +#!/bin/sh

[PATCH 2/3] systemd: Use environment file for connmand debug options

2013-03-13 Thread Jukka Rissanen
--- src/connman.service.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/connman.service.in b/src/connman.service.in index 2e9e4d5..fa57d4e 100644 --- a/src/connman.service.in +++ b/src/connman.service.in @@ -6,7 +6,8 @@ After=syslog.target Type=dbus BusName=net.connm

[PATCH 3/3] systemd: Use environment file for connman-vpnd debug options

2013-03-13 Thread Jukka Rissanen
--- vpn/connman-vpn.service.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vpn/connman-vpn.service.in b/vpn/connman-vpn.service.in index ec02a86..2472f00 100644 --- a/vpn/connman-vpn.service.in +++ b/vpn/connman-vpn.service.in @@ -5,7 +5,8 @@ After=syslog.target [Service

[PATCH 0/3] Setting debug options when using systemd

2013-03-13 Thread Jukka Rissanen
Hi, If one is using systemd to start ConnMan, then activating debugging requires manual editing of connman.service file. That is PITA as one must remember to reload systemd config if changes are made to .service file. This patchset changes that so that user can edit /etc/connman/connmand.env file

[PATCH 1/3] doc: Debugging in host that uses systemd

2013-03-13 Thread Jukka Rissanen
--- README | 16 1 file changed, 16 insertions(+) diff --git a/README b/README index bfb246a..e97b536 100644 --- a/README +++ b/README @@ -246,6 +246,22 @@ Following environment variables can be used: Example: CONNMAN_WEB_DEBUG=1 src/connmand -n +If the host is using syst

[PATCH] doc: Information about activating debugging in ConnMan

2013-03-13 Thread Jukka Rissanen
--- README | 43 +++ 1 file changed, 43 insertions(+) diff --git a/README b/README index 0f86bc1..bfb246a 100644 --- a/README +++ b/README @@ -204,6 +204,49 @@ For a working system, certain configuration options need to be enabled: in order