Send connman mailing list submissions to
        connman@lists.01.org

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
        connman-requ...@lists.01.org

You can reach the person managing the list at
        connman-ow...@lists.01.org

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 <slava.mon...@jolla.com>
To: connman@lists.01.org
Subject: [PATCH] firewall-iptables: Fix use-after-free in
        firewall_remove_rules
Message-ID: <1518554746-7442-1-git-send-email-slava.mon...@jolla.com>

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)
-- 
1.9.1



------------------------------

Message: 2
Date: Tue, 13 Feb 2018 23:52:45 +0200
From: Vasyl Vavrychuk <vvavryc...@gmail.com>
To: connman@lists.01.org
Subject: making Scan method asynchronous
Message-ID:
        <CAGj4m+47VRU2DPLgF-=tgo3lrbdxtvaar0dqze9kmdd9nym...@mail.gmail.com>
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
http://git.merproject.org/mer-core/libconnman-qt/blob/master/plugin/technologymodel.h
they manage their own m_scanning field.


------------------------------

Message: 3
Date: Wed, 14 Feb 2018 11:19:32 +0100
From: Daniel Wagner <w...@monom.org>
To: Christian Spielberger <christian.spielber...@gmail.com>
Cc: connman@lists.01.org
Subject: Re: Planning Address Conflict Detection RFC-5227
Message-ID: <bdce8a54-b3dc-b53d-a508-a990c26d3...@monom.org>
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).

Thanks,
Daniel


------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
connman@lists.01.org
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 28, Issue 10
***************************************

Reply via email to