diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-06-04 21:27:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-04 21:27:25 +0200 |
| commit | 60a5a48fd57ca0708dfe585c8d6c24c96fc5c183 (patch) | |
| tree | 8d19616cb61baad88a18fe039121384aef6053db /python | |
| parent | 53445ee4e56f8dd73c23ca81cee54fe3319fdc88 (diff) | |
| parent | e27942887e7283fe79f39870965c42a3e63acfa2 (diff) | |
| download | vyos-1x-60a5a48fd57ca0708dfe585c8d6c24c96fc5c183.tar.gz vyos-1x-60a5a48fd57ca0708dfe585c8d6c24c96fc5c183.zip | |
Merge pull request #5255 from natali-rs1985/T7931
frr: T7931: Do not restart FRR on unrelated config changes when VRF protocols are configured
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/frrender.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/python/vyos/frrender.py b/python/vyos/frrender.py index ff69f8266..27b8b8568 100644 --- a/python/vyos/frrender.py +++ b/python/vyos/frrender.py @@ -813,10 +813,15 @@ class FRRender: for vrf, vrf_config in config_dict['vrf']['name'].items(): if 'protocols' not in vrf_config: continue - for protocol in vrf_config['protocols']: - vrf_config['protocols'][protocol]['vrf'] = vrf - output += inline_helper(vrf_config['protocols']) + # Do not mutate config_dict in-place — it is also stored as + # cached_config_dict and in-place mutation breaks change + # detection on the next commit (T7931). + protocols = { + protocol: {**proto_dict, 'vrf': vrf} + for protocol, proto_dict in vrf_config['protocols'].items() + } + output += inline_helper(protocols) # remove any accidentally added empty newline to not confuse FRR output = os.linesep.join([s for s in output.splitlines() if s]) |
