summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/helpers/vyos-load-balancer.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/helpers/vyos-load-balancer.py b/src/helpers/vyos-load-balancer.py
index d289f1c7f..38ba8d87b 100755
--- a/src/helpers/vyos-load-balancer.py
+++ b/src/helpers/vyos-load-balancer.py
@@ -375,7 +375,6 @@ if __name__ == '__main__':
#Force state changed to trigger the first write
if init == True:
state['state_changed'] = True
- init = False
if state['state_changed']:
state['if_addr'] = get_ipv4_address(ifname)
@@ -386,6 +385,9 @@ if __name__ == '__main__':
restore_default_route(lb, ifname)
+ # every interface reports its initial state
+ init = False
+
if any(state['state_changed'] for ifname, state in lb['health_state'].items()):
if not nftables_update(lb):
break