summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-12-11 21:35:54 +0100
committerChristian Breunig <christian@breunig.cc>2024-12-16 22:24:50 +0100
commit4d0774e534766d70961975933635e6c54dcc1982 (patch)
tree91d055721c998d27f425e60519ba5ca9014725e7 /src/conf_mode
parent147751ec59527800e956b7ea689805ba80769abe (diff)
downloadvyos-1x-4d0774e534766d70961975933635e6c54dcc1982.tar.gz
vyos-1x-4d0774e534766d70961975933635e6c54dcc1982.zip
vrf: T6746: bugfix change of VNI
VNI was always retrieved via effective configuration and not active configuration.
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/vrf.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py
index 6eea9af4d..1b19c55d2 100755
--- a/src/conf_mode/vrf.py
+++ b/src/conf_mode/vrf.py
@@ -20,7 +20,6 @@ from json import loads
from vyos.config import Config
from vyos.configdict import get_frrender_dict
-from vyos.configdict import dict_merge
from vyos.configdict import node_changed
from vyos.configverify import verify_route_map
from vyos.firewall import conntrack_required
@@ -135,16 +134,6 @@ def get_config(config=None):
# We need to merge the FRR rendering dict into the VRF dict
# this is required to get the route-map information to FRR
vrf.update({'frr_dict' : get_frrender_dict(conf)})
-
- # We also need the route-map information from the config
- #
- # XXX: one MUST always call this without the key_mangling() option! See
- # vyos.configverify.verify_common_route_maps() for more information.
- tmp = {'policy' : {'route-map' : conf.get_config_dict(['policy', 'route-map'],
- get_first_key=True)}}
-
- # Merge policy dict into "regular" config dict
- vrf = dict_merge(tmp, vrf)
return vrf
def verify(vrf):
@@ -194,13 +183,13 @@ def verify(vrf):
if tmp != None:
for protocol, protocol_options in tmp.items():
if 'route_map' in protocol_options:
- verify_route_map(protocol_options['route_map'], vrf)
+ verify_route_map(protocol_options['route_map'], vrf['frr_dict'])
tmp = dict_search('ipv6.protocol', vrf_config)
if tmp != None:
for protocol, protocol_options in tmp.items():
if 'route_map' in protocol_options:
- verify_route_map(protocol_options['route_map'], vrf)
+ verify_route_map(protocol_options['route_map'], vrf['frr_dict'])
return None