From d2354387d9cd1f58101c92e0d8a86649507d171e Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 30 Jan 2020 09:16:43 +0100 Subject: [PATCH] ndisc: remove upper bound for IPv6 autoconfiguration timeout As it is possible to configure an arbitrarily large DHCP timeout, it should be possible to also set a large timeout for IPv6 autoconfiguration. Currently the timeout can only be changed via sysctl. Leave the lower bound because the default kernel sysctl value is 3 * 4 = 12 seconds and so without the lower limit the default timeout would change from 30 to 12 seconds for every user, which seems a big change and could possibly break users' setup. https://bugzilla.redhat.com/show_bug.cgi?id=1795957 (cherry picked from commit d8e1f4c8ef69bd0ea2224b4095be844d216c1d51) --- src/ndisc/nm-ndisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ndisc/nm-ndisc.c b/src/ndisc/nm-ndisc.c index 41201e24aa..8dda03a74e 100644 --- a/src/ndisc/nm-ndisc.c +++ b/src/ndisc/nm-ndisc.c @@ -923,7 +923,7 @@ nm_ndisc_start (NMNDisc *ndisc) switch (priv->node_type) { case NM_NDISC_NODE_TYPE_HOST: ra_wait_secs = (((gint64) priv->router_solicitations) * priv->router_solicitation_interval) + 1; - ra_wait_secs = CLAMP (ra_wait_secs, 30, 120); + ra_wait_secs = MAX (ra_wait_secs, 30); priv->ra_timeout_id = g_timeout_add_seconds (ra_wait_secs, ndisc_ra_timeout_cb, ndisc); _LOGD ("scheduling RA timeout in %d seconds", (int) ra_wait_secs); solicit_routers (ndisc);