diff options
author | Christian Breunig <christian@breunig.cc> | 2025-06-17 16:51:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-17 16:51:17 +0200 |
commit | 8f0d339cbb5a4ae78785def134685c13ae27219e (patch) | |
tree | 31d9d18dd0cac8a756402028a2a48e7628414563 | |
parent | 28deb2d5859e75f31e3f3e2c5dcbbae048963dfa (diff) | |
parent | 243f07b3315dcf7bc3fe68dca362505aa6e761ce (diff) | |
download | vyos-1x-8f0d339cbb5a4ae78785def134685c13ae27219e.tar.gz vyos-1x-8f0d339cbb5a4ae78785def134685c13ae27219e.zip |
Merge pull request #4559 from natali-rs1985/T7506
vrf: T7506: Do not use default table 254 for VRF
-rwxr-xr-x | src/conf_mode/vrf.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py index 8baf55857..6e9d4147a 100755 --- a/src/conf_mode/vrf.py +++ b/src/conf_mode/vrf.py @@ -18,6 +18,8 @@ from sys import exit from jmespath import search from json import loads +import vyos.defaults + from vyos.config import Config from vyos.configdict import node_changed from vyos.configverify import verify_route_map @@ -163,6 +165,11 @@ def verify(vrf): if 'table' not in vrf_config: raise ConfigError(f'VRF "{name}" table id is mandatory!') + if int(vrf_config['table']) == vyos.defaults.rt_global_vrf: + raise ConfigError( + f'VRF "{name}" table id {vrf_config["table"]} cannot be used!' + ) + # routing table id can't be changed - OS restriction if interface_exists(name): tmp = get_vrf_tableid(name) |