diff options
author | Dan Winship <danw@gnome.org> | 2014-03-06 11:58:50 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-03-06 16:03:27 -0500 |
commit | 5ec9b9e97c1e1647c7bb45c79518f1c49cb23cd6 (patch) | |
tree | 6613724685829fbd58a88f582af3502355387a1a | |
parent | 269ab020811e5e7ddf2837c01139e9beee63fb51 (diff) | |
download | NetworkManager-5ec9b9e97c1e1647c7bb45c79518f1c49cb23cd6.tar.gz |
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.
-rw-r--r-- | src/rdisc/nm-lndp-rdisc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rdisc/nm-lndp-rdisc.c b/src/rdisc/nm-lndp-rdisc.c index 6b43ac8bf1..3a3419b3ca 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); } } |