summaryrefslogtreecommitdiff
path: root/src/migration-scripts/nat/5-to-6
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-01-16 08:10:57 -0600
committerGitHub <noreply@github.com>2024-01-16 08:10:57 -0600
commitb452211624184f320524ba360815a94b0f4380b0 (patch)
tree4443917b40592bedc0b7039c35fae59792438241 /src/migration-scripts/nat/5-to-6
parentd6a33db00d113f4c7138e9c0179b74507aa8078e (diff)
parent535228d888fedcc239bf4fa1be962fbd74259ca9 (diff)
downloadvyos-1x-b452211624184f320524ba360815a94b0f4380b0.tar.gz
vyos-1x-b452211624184f320524ba360815a94b0f4380b0.zip
Merge pull request #2836 from vyos/mergify/bp/sagitta/pr-2833
T5889: Fix migration scripts nat 5-to-6 (backport #2833)
Diffstat (limited to 'src/migration-scripts/nat/5-to-6')
-rwxr-xr-xsrc/migration-scripts/nat/5-to-65
1 files changed, 3 insertions, 2 deletions
diff --git a/src/migration-scripts/nat/5-to-6 b/src/migration-scripts/nat/5-to-6
index de3830582..c83b93d84 100755
--- a/src/migration-scripts/nat/5-to-6
+++ b/src/migration-scripts/nat/5-to-6
@@ -51,8 +51,9 @@ for direction in ['source', 'destination']:
for iface in ['inbound-interface','outbound-interface']:
if config.exists(base + [iface]):
tmp = config.return_value(base + [iface])
- config.delete(base + [iface])
- config.set(base + [iface, 'interface-name'], value=tmp)
+ if tmp:
+ config.delete(base + [iface])
+ config.set(base + [iface, 'interface-name'], value=tmp)
try:
with open(file_name, 'w') as f: