Send connman mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

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

Today's Topics:

   1. [PATCH] firewall-iptables: Fix use-after-free in
      firewall_remove_rules (Slava Monich)
   2. making Scan method asynchronous (Vasyl Vavrychuk)
   3. Re: Planning Address Conflict Detection RFC-5227 (Daniel Wagner)


Message: 1
Date: Tue, 13 Feb 2018 22:45:46 +0200
From: Slava Monich <>
Subject: [PATCH] firewall-iptables: Fix use-after-free in
Message-ID: <>

g_list_previous was accessing the pointer deallocated by g_list_remove.
g_list_free_full does it right.
 src/firewall-iptables.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/firewall-iptables.c b/src/firewall-iptables.c
index 45943a8..0fc9872 100644
--- a/src/firewall-iptables.c
+++ b/src/firewall-iptables.c
@@ -343,16 +343,8 @@ static void firewall_add_rule(struct firewall_context *ctx,
 static void firewall_remove_rules(struct firewall_context *ctx)
-       struct fw_rule *rule;
-       GList *list;
-       for (list = g_list_last(ctx->rules); list;
-                       list = g_list_previous(list)) {
-               rule = list->data;
-               ctx->rules = g_list_remove(ctx->rules, rule);
-               cleanup_fw_rule(rule);
-       }
+       g_list_free_full(ctx->rules, cleanup_fw_rule);
+       ctx->rules = NULL;
 static int firewall_enable_rules(struct firewall_context *ctx)


Message: 2
Date: Tue, 13 Feb 2018 23:52:45 +0200
From: Vasyl Vavrychuk <>
Subject: making Scan method asynchronous
Content-Type: text/plain; charset="UTF-8"

I would like to make P2P_FIND_TIMEOUT large than 30 seconds locally.
Potentially it can be very large value even infinite.

But then connmanctl's 'scan p2p' command will timeout because connman
client has 120 seconds D-Bus reply timeout.

In my opinion it would be better if
1. Make Scan method being asynchronous in the sense it returns upon scan start.
2. Add Scanning property. That is what UI does, for example here
they manage their own m_scanning field.


Message: 3
Date: Wed, 14 Feb 2018 11:19:32 +0100
From: Daniel Wagner <>
To: Christian Spielberger <>
Subject: Re: Planning Address Conflict Detection RFC-5227
Message-ID: <>
Content-Type: text/plain; charset=utf-8

Hi Christian,

> I see two solutions:
> (A) Split up client.c, also GDHCPClient and what ever. The goal would be to
>       seperate DHCP, ACD, ipv4ll, ARP. Where ipv4ll is a special case of ACD.
>       DHCP and ACD use ipv4ll as fallback. ARP is a small utility lib which is
>       used by ACD.
>       This might look not so bad but the drawback is a big change, lots of 
> testing.
>       So high risk.
> (B) Or I use the current ipv4ll as reference to implement ACD (in 
> include/src),
>       make a new ipv4ll based on the new ACD which is independent from dhcp.
> My plan is to start with (B) and if it works and the code looks good, then 
> maybe
> solution (A) becomes closer and easier. So after (B) works we could discuss 
> how
> to refactor until we have (A) or something closer to (A).

Sounds like a good plan to me. I still want to reach (A) but we start
with (B) and then gradually change the code base to (A).



Subject: Digest Footer

connman mailing list


End of connman Digest, Vol 28, Issue 10

Reply via email to