diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/dhcp_server.py | 5 | ||||
-rwxr-xr-x | src/conf_mode/vrrp.py | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/conf_mode/dhcp_server.py b/src/conf_mode/dhcp_server.py index ff0f5ecc5..b5d4a3ade 100755 --- a/src/conf_mode/dhcp_server.py +++ b/src/conf_mode/dhcp_server.py @@ -174,8 +174,11 @@ def verify(dhcp): # DHCP failover needs at least one subnet that uses it if 'enable_failover' in subnet_config: if 'failover' not in dhcp: - raise ConfigError(f'Can not enable failover for "{subnet}" in "{network}".\n' \ + raise ConfigError(f'Cannot enable failover for "{subnet}" in "{network}".\n' \ 'Failover is not configured globally!') + if 'range' not in subnet_config: + raise ConfigError(f'Cannot enable failover for "{subnet}" in "{network}".\n' \ + f'Range is not configured for "{subnet}"') failover_ok = True # Check if DHCP address range is inside configured subnet declaration 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 |