diff options
| author | Christian Breunig <christian@breunig.cc> | 2025-11-25 16:22:57 +0100 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2025-11-25 16:22:57 +0100 |
| commit | cc4d2167cf756d37cc60c3e415b2ac30f622b85b (patch) | |
| tree | d201e0688ea898eccd7f8ae774ec05b278317b44 /src/conf_mode/protocols_ospfv3.py | |
| parent | fdda826b48688e253c30d3578ca5edd45b034ab0 (diff) | |
| download | vyos-1x-cc4d2167cf756d37cc60c3e415b2ac30f622b85b.tar.gz vyos-1x-cc4d2167cf756d37cc60c3e415b2ac30f622b85b.zip | |
frr: T8034: use dict_search() for routing protocols to check if VRF is used
dict_search() is save when passing in keys that do not exist in the dict
we are working on.
Diffstat (limited to 'src/conf_mode/protocols_ospfv3.py')
| -rwxr-xr-x | src/conf_mode/protocols_ospfv3.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/protocols_ospfv3.py b/src/conf_mode/protocols_ospfv3.py index 1d2eceb8f..2db7b1d42 100755 --- a/src/conf_mode/protocols_ospfv3.py +++ b/src/conf_mode/protocols_ospfv3.py @@ -49,7 +49,8 @@ def verify(config_dict): vrf = config_dict['vrf_context'] # eqivalent of the C foo ? 'a' : 'b' statement - ospfv3 = vrf and config_dict['vrf']['name'][vrf]['protocols']['ospfv3'] or config_dict['ospfv3'] + ospfv3 = vrf and dict_search(f'vrf.name.{vrf}.protocols.ospfv3', + config_dict) or config_dict['ospfv3'] ospfv3['policy'] = config_dict['policy'] verify_common_route_maps(ospfv3) |
