dhcpv6: Added initial MRD support
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Mon, 6 May 2013 10:06:31 +0000 (13:06 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Mon, 6 May 2013 11:33:51 +0000 (14:33 +0300)
MRD (Maximum Retransmission Duration) is the total duration of
of retransmission of the message. This will be used when sending
Confirm message.

src/dhcpv6.c

index 6b03a1b..f32b4c2 100644 (file)
@@ -62,6 +62,7 @@ struct connman_dhcpv6 {
        GDHCPClient *dhcp_client;
 
        guint timeout;          /* operation timeout in msec */
+       guint MRD;              /* max operation timeout in msec */
        guint RT;               /* in msec */
        gboolean use_ta;        /* set to TRUE if IPv6 privacy is enabled */
        GSList *prefixes;       /* network prefixes from radvd */
@@ -80,6 +81,11 @@ static void clear_timer(struct connman_dhcpv6 *dhcp)
                g_source_remove(dhcp->timeout);
                dhcp->timeout = 0;
        }
+
+       if (dhcp->MRD > 0) {
+               g_source_remove(dhcp->MRD);
+               dhcp->MRD = 0;
+       }
 }
 
 static inline float get_random()