diff options
author | Simon <965089+sarthurdev@users.noreply.github.com> | 2025-02-26 23:11:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-26 22:11:35 +0000 |
commit | 92ad401f0b7459fa3c50092a1bdd8255946e5661 (patch) | |
tree | b96bc51e5e91693297e837573e653e0877c1454d /src/helpers | |
parent | 4ce3b92f92739570233928980622d97220ffce71 (diff) | |
download | vyos-1x-92ad401f0b7459fa3c50092a1bdd8255946e5661.tar.gz vyos-1x-92ad401f0b7459fa3c50092a1bdd8255946e5661.zip |
wlb: T7196: Migrate interface wildcards to nftables format
* wlb: T7196: Migrate interface wildcards to nftables format
* wlb: T7196: Fix exclude/interface verify check
* wlb: T7196: Extra sanity check on ipv4 address function
Diffstat (limited to 'src/helpers')
-rwxr-xr-x | src/helpers/vyos-load-balancer.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/vyos-load-balancer.py b/src/helpers/vyos-load-balancer.py index 2f07160b4..30329fd5c 100755 --- a/src/helpers/vyos-load-balancer.py +++ b/src/helpers/vyos-load-balancer.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -# Copyright 2024 VyOS maintainers and contributors <maintainers@vyos.io> +# Copyright 2024-2025 VyOS maintainers and contributors <maintainers@vyos.io> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -95,7 +95,7 @@ def on_state_change(lb, ifname, state): def get_ipv4_address(ifname): # Get primary ipv4 address on interface (for source nat) addr_json = get_interface_address(ifname) - if 'addr_info' in addr_json and len(addr_json['addr_info']) > 0: + if addr_json and 'addr_info' in addr_json and len(addr_json['addr_info']) > 0: for addr_info in addr_json['addr_info']: if addr_info['family'] == 'inet': if 'local' in addr_info: |