From 5ec9b9e97c1e1647c7bb45c79518f1c49cb23cd6 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 6 Mar 2014 11:58:50 -0500 Subject: [PATCH] rdisc: set the expiration timer correctly (rh #1073560) check_timestamps() was mixing up absolute and relative timestamps, which meant that IPv6 expiration checks more-or-less stopped happening after a while, allowing expired IPv6 routes, etc, to remain applied. --- src/rdisc/nm-lndp-rdisc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rdisc/nm-lndp-rdisc.c b/src/rdisc/nm-lndp-rdisc.c index 6b43ac8bf..3a3419b3c 100644 --- a/src/rdisc/nm-lndp-rdisc.c +++ b/src/rdisc/nm-lndp-rdisc.c @@ -402,8 +402,10 @@ check_timestamps (NMRDisc *rdisc, guint32 now, NMRDiscConfigMap changed) g_signal_emit_by_name (rdisc, NM_RDISC_CONFIG_CHANGED, changed); if (nextevent != never) { - debug ("(%s): scheduling next now/lifetime check: %u seconds", rdisc->ifname, nextevent); - priv->timeout_id = g_timeout_add_seconds (nextevent, timeout_cb, rdisc); + g_return_if_fail (nextevent > now); + debug ("(%s): scheduling next now/lifetime check: %u seconds", + rdisc->ifname, nextevent - now); + priv->timeout_id = g_timeout_add_seconds (nextevent - now, timeout_cb, rdisc); } }