summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2024-08-15 13:20:31 +0300
committerNataliia Solomko <natalirs1985@gmail.com>2024-08-15 19:12:37 +0300
commit663e468de2b431f771534b4e3a2d00a5924b98fe (patch)
treef9f1f890dc859480a0e9abdeeae14c31c334a120 /src/conf_mode
parente229d7498cc77298c79af9811a742f3ad54edf4c (diff)
downloadvyos-1x-663e468de2b431f771534b4e3a2d00a5924b98fe.tar.gz
vyos-1x-663e468de2b431f771534b4e3a2d00a5924b98fe.zip
T6649: Accel-ppp separate vlan-mon from listen interfaces
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/service_ipoe-server.py2
-rwxr-xr-xsrc/conf_mode/service_pppoe-server.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/conf_mode/service_ipoe-server.py b/src/conf_mode/service_ipoe-server.py
index 16c82e591..c7e3ef033 100755
--- a/src/conf_mode/service_ipoe-server.py
+++ b/src/conf_mode/service_ipoe-server.py
@@ -70,6 +70,8 @@ def verify(ipoe):
if 'client_subnet' in iface_config and 'vlan' in iface_config:
raise ConfigError('Option "client-subnet" and "vlan" are mutually exclusive, '
'use "client-ip-pool" instead!')
+ if 'vlan_mon' in iface_config and not 'vlan' in iface_config:
+ raise ConfigError('Option "vlan-mon" requires "vlan" to be set!')
verify_accel_ppp_authentication(ipoe, local_users=False)
verify_accel_ppp_ip_pool(ipoe)
diff --git a/src/conf_mode/service_pppoe-server.py b/src/conf_mode/service_pppoe-server.py
index 566a7b149..ac697c509 100755
--- a/src/conf_mode/service_pppoe-server.py
+++ b/src/conf_mode/service_pppoe-server.py
@@ -121,9 +121,12 @@ def verify(pppoe):
raise ConfigError('At least one listen interface must be defined!')
# Check is interface exists in the system
- for interface in pppoe['interface']:
+ for interface, interface_config in pppoe['interface'].items():
verify_interface_exists(pppoe, interface, warning_only=True)
+ if 'vlan_mon' in interface_config and not 'vlan' in interface_config:
+ raise ConfigError('Option "vlan-mon" requires "vlan" to be set!')
+
return None