summaryrefslogtreecommitdiff
path: root/src/conf_mode/vrrp.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-03-14 12:13:58 +0100
committerGitHub <noreply@github.com>2024-03-14 12:13:58 +0100
commit1ba302d55b86d63880fe2f55286fe82003f8a31f (patch)
treeeda8e14158503fea24d1a9f7d94b67f6d41b4636 /src/conf_mode/vrrp.py
parent423a25a814ca92870399dab1c5e107732a16292d (diff)
parentd632ce658cbe6557b17cffd3c0b17545ee3181c2 (diff)
downloadvyos-1x-1ba302d55b86d63880fe2f55286fe82003f8a31f.tar.gz
vyos-1x-1ba302d55b86d63880fe2f55286fe82003f8a31f.zip
Merge pull request #3130 from natali-rs1985/T5504-equuleus
vrrp: T5504: Keepalived VRRP ability to set more than one peer-address
Diffstat (limited to 'src/conf_mode/vrrp.py')
-rwxr-xr-xsrc/conf_mode/vrrp.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/conf_mode/vrrp.py b/src/conf_mode/vrrp.py
index 6a14cd9b6..0f41dd32f 100755
--- a/src/conf_mode/vrrp.py
+++ b/src/conf_mode/vrrp.py
@@ -119,8 +119,9 @@ def verify(vrrp):
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:
if 'hello_source_address' in group_config:
@@ -128,8 +129,9 @@ def verify(vrrp):
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!')
# Warn the user about the deprecated mode-force option