From 97f36fe0c1f337d73e5f0af4e2fecefadc3325b4 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 29 Nov 2022 07:34:40 +0100 Subject: mpls: T915: verify interface actually exists on the system --- src/conf_mode/protocols_mpls.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/conf_mode/protocols_mpls.py') 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 -- cgit v1.2.3