commit | 5544a5005c244b6342e4299f41c8b99aa11404ef | [log] [tgz] |
---|---|---|
author | Rocco Yue <rocco.yue@mediatek.com> | Thu Sep 03 21:10:26 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Sep 03 21:10:26 2020 +0000 |
tree | 87f987295168e272ba3b198cb68f4fa51c6275b3 | |
parent | 06d2f0e393efa32e70fda7510229b2e12054e13a [diff] | |
parent | 54f527ff0cc730cc4c18ec4ceb88ec26a8d73c58 [diff] |
update last poll time when the interface poll frequency is reached am: e4b7da622c am: 7bb0ca41d5 am: 54f527ff0c Original change: https://android-review.googlesource.com/c/platform/external/android-clat/+/1419090 Change-Id: Ic92d30a8825777419eae38bc4d6493f671d9795d
diff --git a/clatd.c b/clatd.c index 7063215..422cded 100644 --- a/clatd.c +++ b/clatd.c
@@ -426,7 +426,8 @@ } time_t now = time(NULL); - if (last_interface_poll < (now - INTERFACE_POLL_FREQUENCY)) { + if (now >= (last_interface_poll + INTERFACE_POLL_FREQUENCY)) { + last_interface_poll = now; if (ipv6_address_changed(Global_Clatd_Config.native_ipv6_interface)) { break; }