commit | 54f527ff0cc730cc4c18ec4ceb88ec26a8d73c58 | [log] [tgz] |
---|---|---|
author | Rocco Yue <rocco.yue@mediatek.com> | Thu Sep 03 20:56:52 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Sep 03 20:56:52 2020 +0000 |
tree | 87f987295168e272ba3b198cb68f4fa51c6275b3 | |
parent | 469fd424e4cdd7bc274430cddfb91234cf5e01a5 [diff] | |
parent | 7bb0ca41d5ddd0c4d4c228f939130ccca270af51 [diff] |
update last poll time when the interface poll frequency is reached am: e4b7da622c am: 7bb0ca41d5 Original change: https://android-review.googlesource.com/c/platform/external/android-clat/+/1419090 Change-Id: Idd9a0e2352467faa26cdeb3d9166015556bad9f6
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; }