summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-01-16 15:08:03 +0100
committerGitHub <noreply@github.com>2024-01-16 15:08:03 +0100
commit1ced01d23177120b50aa07f627e0b459b2953f9e (patch)
tree61969635d10889f2b5ee7f7eacda0d1c5a951f73
parentc9b20f8884d8ee9f519ab1235e2ac8d980c4373e (diff)
parent813237d9766f636394b9ab385bb825fbf83202b3 (diff)
downloadvyos-1x-1ced01d23177120b50aa07f627e0b459b2953f9e.tar.gz
vyos-1x-1ced01d23177120b50aa07f627e0b459b2953f9e.zip
Merge pull request #2833 from sever-sever/T5889
T5889: Fix 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: