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. [PATCH] dnsproxy: send response for all requests (Saurav Babu)
2. [PATCH] client: Add support to print DBUS_TYPE_UINT64
(Saurav Babu)
3. [PATCH] client: Add support to GetProperties Clock API in
connmanctl (Saurav Babu)
4. incorrect iptable rule deletion for session fwmarks
(Dragos Tatulea)
5. incorrect iptable rule deletion for session fwmarks
(Dragos Tatulea)
----------------------------------------------------------------------
Message: 1
Date: Fri, 08 Jan 2016 14:21:38 +0530
From: Saurav Babu <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH] dnsproxy: send response for all requests
Message-ID: <[email protected]>
When list->data is removed from GSList using g_slist_remove() then
list->next becomes NULL and the loop terminates. This patch ensures list
points to list->next before removing req from request_list.
---
src/dnsproxy.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index c497f73..06e867a 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -2259,9 +2259,11 @@ hangup:
g_free(server->incoming_reply);
server->incoming_reply = NULL;
- for (list = request_list; list; list = list->next) {
+ list = request_list;
+ while (list) {
struct request_data *req = list->data;
struct domain_hdr *hdr;
+ list = list->next;
if (req->protocol == IPPROTO_UDP)
continue;
--
1.9.1
------------------------------
Message: 2
Date: Fri, 08 Jan 2016 16:38:36 +0530
From: Saurav Babu <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH] client: Add support to print DBUS_TYPE_UINT64
Message-ID:
<[email protected]>
---
client/dbus_helpers.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/client/dbus_helpers.c b/client/dbus_helpers.c
index 9c4cfee..461266c 100644
--- a/client/dbus_helpers.c
+++ b/client/dbus_helpers.c
@@ -38,6 +38,7 @@ void __connmanctl_dbus_print(DBusMessageIter *iter, const
char *pre,
dbus_uint16_t u16;
dbus_uint32_t u;
dbus_int32_t i;
+ dbus_uint64_t u64;
double d;
char *str;
@@ -113,6 +114,11 @@ void __connmanctl_dbus_print(DBusMessageIter *iter, const
char *pre,
fprintf(stdout, "%d", i);
break;
+ case DBUS_TYPE_UINT64:
+ dbus_message_iter_get_basic(iter, &u64);
+ fprintf(stdout, "%lu", u64);
+ break;
+
case DBUS_TYPE_DOUBLE:
dbus_message_iter_get_basic(iter, &d);
fprintf(stdout, "%f", d);
--
1.9.1
------------------------------
Message: 3
Date: Fri, 08 Jan 2016 16:39:34 +0530
From: Saurav Babu <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH] client: Add support to GetProperties Clock API in
connmanctl
Message-ID:
<[email protected]>
---
client/commands.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/client/commands.c b/client/commands.c
index 3bfdfd7..db24d16 100644
--- a/client/commands.c
+++ b/client/commands.c
@@ -266,6 +266,33 @@ static int cmd_state(char *args[], int num, struct
connman_option *options)
state_print, NULL, NULL, NULL);
}
+static int clock_print(DBusMessageIter *iter, const char *error,
+ void *user_data)
+{
+ DBusMessageIter entry;
+
+ if (error) {
+ fprintf(stderr, "Error: %s", error);
+ return 0;
+ }
+
+ dbus_message_iter_recurse(iter, &entry);
+ __connmanctl_dbus_print(&entry, " ", " = ", "\n");
+ fprintf(stdout, "\n");
+
+ return 0;
+}
+
+static int cmd_clock(char *args[], int num, struct connman_option *options)
+{
+ if (num > 1)
+ return -E2BIG;
+
+ return __connmanctl_dbus_method_call(connection, CONNMAN_SERVICE,
+ CONNMAN_PATH, "net.connman.Clock", "GetProperties",
+ clock_print, NULL, NULL, NULL);
+}
+
static int services_list(DBusMessageIter *iter, const char *error,
void *user_data)
{
@@ -2507,6 +2534,8 @@ static const struct {
"Shows if the system is online or offline", NULL },
{ "technologies", NULL, NULL, cmd_technologies,
"Display technologies", NULL },
+ { "clock", NULL, NULL, cmd_clock,
+ "Get System Clock Properties", NULL },
{ "enable", "<technology>|offline", NULL, cmd_enable,
"Enables given technology or offline mode",
lookup_technology_offline },
--
1.9.1
------------------------------
Message: 4
Date: Fri, 8 Jan 2016 17:05:59 +0100
From: Dragos Tatulea <[email protected]>
To: [email protected]
Subject: incorrect iptable rule deletion for session fwmarks
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Hi,
I'm playing around with connman 1.31 and sessions with user policies. I have
observed a case when deletion of iptable fwmark rules doesn't work as
expected. The wrong rule gets deleted.
With connman running, I create the following sessions:
#> ./connman/test/test-session create /foo session0
#> ./connman/test/test-session create /foo session1
#> iptables -t mangle -L
...
Chain connman-OUTPUT (1 references)
target prot opt source destination
MARK all -- anywhere anywhere owner UID match
vagrant MARK set 0x100
MARK all -- anywhere anywhere owner UID match
vagrant MARK set 0x101
...
#> ./connman/test/test-session destroy /foo session1
...
Chain connman-OUTPUT (1 references)
target prot opt source destination
MARK all -- anywhere anywhere owner UID match
vagrant MARK set 0x101
...
I would expect that rule with mark 0x100 would be deleted. The commands
are being run as user vagrant. The policy file looks like this:
#> cat /usr/local/var/lib/connman/session_policy_local/vagrant.policy
[policy_vagrant]
uid = vagrant
ConnectionType = any
AllowedBearers = ethernet
As noticed from the path, I'm running connman in maintainer mode.
So, is this expected behavior? This might be harmless in general. I'm
working on having per session multipath routes installed. In that case,
getting the fwmark right is important.
Thank you
--
Dragos Tatulea
Software Developer @ Endocode AG
[email protected]
Endocode AG, Br?ckenstra?e 5A, 10179 Berlin
+49 30 1206 4472 | [email protected] | www.endocode.com
Vorstandsvorsitzender: Mirko Boehm
Vorst?nde: Dr. Karl Beecher, Dr. Thomas Fricke, Sebastian Sucker
Aufsichtsratsvorsitzende: Alexandra Boehm
Registergericht: Amtsgericht Charlottenburg - HRB 150748 B
------------------------------
Message: 5
Date: Fri, 8 Jan 2016 17:25:16 +0100
From: Dragos Tatulea <[email protected]>
To: [email protected]
Subject: incorrect iptable rule deletion for session fwmarks
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Hi,
I'm playing around with connman 1.31 and sessions with user policies. I have
observed a case when deletion of iptable fwmark rules doesn't work as
expected. The wrong rule gets deleted.
With connman running, I create the following sessions:
#> ./connman/test/test-session create /foo session0
#> ./connman/test/test-session create /foo session1
#> iptables -t mangle -L
...
Chain connman-OUTPUT (1 references)
target prot opt source destination
MARK all -- anywhere anywhere owner UID match
vagrant MARK set 0x100
MARK all -- anywhere anywhere owner UID match
vagrant MARK set 0x101
...
#> ./connman/test/test-session destroy /foo session1
...
Chain connman-OUTPUT (1 references)
target prot opt source destination
MARK all -- anywhere anywhere owner UID match
vagrant MARK set 0x101
...
I would expect that rule with mark 0x100 would be deleted. The commands
are being run as user vagrant. The policy file looks like this:
#> cat /usr/local/var/lib/connman/session_policy_local/vagrant.policy
[policy_vagrant]
uid = vagrant
ConnectionType = any
AllowedBearers = ethernet
As noticed from the path, I'm running connman in maintainer mode.
So, is this expected behavior? This might be harmless in general. I'm
working on having per session multipath routes installed. In that case,
getting the fwmark right is important.
Thank you
--
Dragos Tatulea
Software Developer @ Endocode AG
[email protected]
Endocode AG, Br?ckenstra?e 5A, 10179 Berlin
+49 30 1206 4472 | [email protected] | www.endocode.com
Vorstandsvorsitzender: Mirko Boehm
Vorst?nde: Dr. Karl Beecher, Dr. Thomas Fricke, Sebastian Sucker
Aufsichtsratsvorsitzende: Alexandra Boehm
Registergericht: Amtsgericht Charlottenburg - HRB 150748 B
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 3, Issue 4
*************************************