summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-20 16:17:45 +0200
committerGitHub <noreply@github.com>2024-07-20 16:17:45 +0200
commitda3d9415542d57a64322665efd16024ce92330dd (patch)
treea485d1b84ff531ff8529df9b8a982bf5a81deff4 /src
parent458a724edb4c9b4a6e2bb63c2a7d8f531ec91252 (diff)
parent36f3791e0c15267483d59a3bb74465811d08df88 (diff)
downloadvyos-1x-da3d9415542d57a64322665efd16024ce92330dd.tar.gz
vyos-1x-da3d9415542d57a64322665efd16024ce92330dd.zip
Merge pull request #3834 from c-po/interface-vrf-move
interfaces: T6592: moving an interface between VRF instances failed
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/vrf.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py
index 8d8c234c0..12edb7d02 100755
--- a/src/conf_mode/vrf.py
+++ b/src/conf_mode/vrf.py
@@ -27,6 +27,7 @@ from vyos.template import render
from vyos.template import render_to_string
from vyos.utils.dict import dict_search
from vyos.utils.network import get_interface_config
+from vyos.utils.network import get_vrf_tableid
from vyos.utils.network import get_vrf_members
from vyos.utils.network import interface_exists
from vyos.utils.process import call
@@ -160,8 +161,8 @@ def verify(vrf):
# routing table id can't be changed - OS restriction
if interface_exists(name):
- tmp = str(dict_search('linkinfo.info_data.table', get_interface_config(name)))
- if tmp and tmp != vrf_config['table']:
+ tmp = get_vrf_tableid(name)
+ if tmp and tmp != int(vrf_config['table']):
raise ConfigError(f'VRF "{name}" table id modification not possible!')
# VRF routing table ID must be unique on the system