summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2017-12-13 11:38:15 +0530
committerNiraj Kumar Goit <niraj.g@samsung.com>2017-12-19 09:58:13 +0530
commitf911da60ac8a5058b8182c30f765e12d7bdaf943 (patch)
tree790aeffee423243092a3d06a99a0edb8e019a774 /src
parent63b7d02f765b726b3713133f4283dbbcc3129c29 (diff)
downloadconnman-f911da60ac8a5058b8182c30f765e12d7bdaf943.tar.gz
connman-f911da60ac8a5058b8182c30f765e12d7bdaf943.tar.bz2
connman-f911da60ac8a5058b8182c30f765e12d7bdaf943.zip
[Upstream] Wait 4 seconds for RA before re-sending RS messages.
As per RFC 4861, a host should transmit up to 3 Router Solicitation messages, each separated by at least RTR_SOLICITATION_INTERVAL(4) seconds to obtain RA for IPv6 auto-configuration. Change-Id: I970a69737dd0dd030291d725888cac64bddd6b16 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/network.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/network.c b/src/network.c
index 23ba7271..64c26cca 100755
--- a/src/network.c
+++ b/src/network.c
@@ -46,6 +46,13 @@
#define WIFI_BSSID_LEN_MAX 6
#endif
+/*
+ * As per RFC 4861, a host should transmit up to MAX_RTR_SOLICITATIONS(3)
+ * Router Solicitation messages, each separated by at least
+ * RTR_SOLICITATION_INTERVAL(4) seconds to obtain RA for IPv6 auto-configuration.
+ */
+#define RTR_SOLICITATION_INTERVAL 4
+
static GSList *network_list = NULL;
static GSList *driver_list = NULL;
@@ -461,7 +468,7 @@ static void check_dhcpv6(struct nd_router_advert *reply,
DBG("re-send router solicitation %d",
network->router_solicit_count);
network->router_solicit_count--;
- __connman_inet_ipv6_send_rs(network->index, 1,
+ __connman_inet_ipv6_send_rs(network->index, RTR_SOLICITATION_INTERVAL,
check_dhcpv6, network);
return;
}
@@ -632,7 +639,8 @@ static void autoconf_ipv6_set(struct connman_network *network)
/* Try to get stateless DHCPv6 information, RFC 3736 */
network->router_solicit_count = 3;
- __connman_inet_ipv6_send_rs(index, 1, check_dhcpv6, network);
+ __connman_inet_ipv6_send_rs(index, RTR_SOLICITATION_INTERVAL,
+ check_dhcpv6, network);
}
static void set_connected(struct connman_network *network)