summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-02-29 16:45:27 +0100
committerGitHub <noreply@github.com>2024-02-29 16:45:27 +0100
commitbb70f9964fd845bca0a5396dde7ca50e3daa2db3 (patch)
treef3fb3c800023f895eb09c60c0b19af320ebdd7c8 /src
parentbeb120958f0a6556db30a2aaf8dcd997506b2035 (diff)
parent195428e467c24e4bac59ea639891b0ada898bd30 (diff)
downloadvyos-1x-bb70f9964fd845bca0a5396dde7ca50e3daa2db3.tar.gz
vyos-1x-bb70f9964fd845bca0a5396dde7ca50e3daa2db3.zip
Merge pull request #3064 from vyos/mergify/bp/sagitta/pr-3056
T5504: Keepalived VRRP ability to set more than one peer-address (backport #3056)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/high-availability.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/conf_mode/high-availability.py b/src/conf_mode/high-availability.py
index b3b27b14e..59d49ea67 100755
--- a/src/conf_mode/high-availability.py
+++ b/src/conf_mode/high-availability.py
@@ -125,8 +125,9 @@ def verify(ha):
raise ConfigError(f'VRRP group "{group}" uses IPv4 but hello-source-address is IPv6!')
if 'peer_address' in group_config:
- if is_ipv6(group_config['peer_address']):
- raise ConfigError(f'VRRP group "{group}" uses IPv4 but peer-address is IPv6!')
+ for peer_address in group_config['peer_address']:
+ if is_ipv6(peer_address):
+ raise ConfigError(f'VRRP group "{group}" uses IPv4 but peer-address is IPv6!')
if vaddrs6:
tmp = {'interface': interface, 'vrid': vrid, 'ipver': 'IPv6'}
@@ -139,8 +140,9 @@ def verify(ha):
raise ConfigError(f'VRRP group "{group}" uses IPv6 but hello-source-address is IPv4!')
if 'peer_address' in group_config:
- if is_ipv4(group_config['peer_address']):
- raise ConfigError(f'VRRP group "{group}" uses IPv6 but peer-address is IPv4!')
+ for peer_address in group_config['peer_address']:
+ if is_ipv4(peer_address):
+ raise ConfigError(f'VRRP group "{group}" uses IPv6 but peer-address is IPv4!')
# Check sync groups
if 'vrrp' in ha and 'sync_group' in ha['vrrp']:
for sync_group, sync_config in ha['vrrp']['sync_group'].items():