From 8ceabeff9c3c78410725b8504c9b060a0d7d016f Mon Sep 17 00:00:00 2001 From: "black.box (Unzoner) team@belodetek.io" Date: Fri, 1 Dec 2023 15:09:41 -0800 Subject: [PATCH] fix: reset loop if any tunnel interface is not passing traffic --- unzoner/src/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unzoner/src/main.py b/unzoner/src/main.py index cdbce1f..248c6eb 100755 --- a/unzoner/src/main.py +++ b/unzoner/src/main.py @@ -253,7 +253,8 @@ def main(): ) ) - if i % POLL_FREQ == 0 and s_local[idx]: # every x cycles per loop + # check if server tunnel interface(s) are still passing traffic (assume not) + if i % POLL_FREQ == 0: # every x cycles per loop s_loss[idx] = 100 try: s_loss[idx] = ping_host(host=s_local[idx]) @@ -647,7 +648,8 @@ def main(): ) ) - if i % POLL_FREQ == 0 and c_gwip: + # check if client side tunnel is still passing traffic (assume not) + if i % POLL_FREQ == 0: # every x cycles per loop c_loss = 100 try: c_loss = ping_host(host=c_gwip)