summaryrefslogtreecommitdiff
path: root/src/migration-scripts
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-04 20:59:01 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-04-04 19:26:52 +0000
commit8948a5d5b93614a16199df6f5b3d5b1b00164ac8 (patch)
treefd42d15c42c3b689eafb7159166e3dd48d9c64cf /src/migration-scripts
parente4d6e98c6dfcf4c92e03583903288a5da834bab1 (diff)
downloadvyos-1x-8948a5d5b93614a16199df6f5b3d5b1b00164ac8.tar.gz
vyos-1x-8948a5d5b93614a16199df6f5b3d5b1b00164ac8.zip
ospf: T6089: fix invalid "ospf passive-interface default"
The option "passive-interface default" was set even if it was not present in the previous version we are migrating from. Fix migration script to handle this with a conditional path. (cherry picked from commit ef8d9a73335bc685084e3ff97238836e452dfa8c)
Diffstat (limited to 'src/migration-scripts')
-rwxr-xr-xsrc/migration-scripts/ospf/0-to-13
1 files changed, 2 insertions, 1 deletions
diff --git a/src/migration-scripts/ospf/0-to-1 b/src/migration-scripts/ospf/0-to-1
index a6cb9feb8..4085423a2 100755
--- a/src/migration-scripts/ospf/0-to-1
+++ b/src/migration-scripts/ospf/0-to-1
@@ -31,7 +31,8 @@ def ospf_passive_migration(config, ospf_base):
config.set_tag(ospf_base + ['interface'])
config.delete(ospf_base + ['passive-interface'])
- config.set(ospf_base + ['passive-interface'], value='default')
+ if default:
+ config.set(ospf_base + ['passive-interface'], value='default')
if config.exists(ospf_base + ['passive-interface-exclude']):
for interface in config.return_values(ospf_base + ['passive-interface-exclude']):