diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-11-29 07:34:40 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-11-29 07:34:40 +0100 |
commit | 97f36fe0c1f337d73e5f0af4e2fecefadc3325b4 (patch) | |
tree | 51cece3175dcf0d799b5755f43e441ea941964b2 /src/conf_mode | |
parent | ff8da7dcd5a20c4075d4eeae08e519c3b271517c (diff) | |
download | vyos-1x-97f36fe0c1f337d73e5f0af4e2fecefadc3325b4.tar.gz vyos-1x-97f36fe0c1f337d73e5f0af4e2fecefadc3325b4.zip |
mpls: T915: verify interface actually exists on the system
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/protocols_mpls.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_mpls.py b/src/conf_mode/protocols_mpls.py index 5da8e7b06..73af6595b 100755 --- a/src/conf_mode/protocols_mpls.py +++ b/src/conf_mode/protocols_mpls.py @@ -24,6 +24,7 @@ from vyos.template import render_to_string from vyos.util import dict_search from vyos.util import read_file from vyos.util import sysctl_write +from vyos.configverify import verify_interface_exists from vyos import ConfigError from vyos import frr from vyos import airbag @@ -46,6 +47,10 @@ def verify(mpls): if not mpls: return None + if 'interface' in mpls: + for interface in mpls['interface']: + verify_interface_exists(interface) + # Checks to see if LDP is properly configured if 'ldp' in mpls: # If router ID not defined |