diff --git a/smoketest/config-tests/ospf-simple b/smoketest/config-tests/ospf-simple
new file mode 100644
index 000000000..13d5e7038
--- /dev/null
+++ b/smoketest/config-tests/ospf-simple
@@ -0,0 +1,20 @@
+set interfaces ethernet eth0 vif 20 address '193.201.42.173/28'
+set interfaces ethernet eth0 vif 666 address '10.66.66.1/24'
+set interfaces loopback lo
+set protocols ospf area 0 network '10.66.66.0/24'
+set protocols ospf area 0 network '193.201.42.160/28'
+set protocols ospf area 0 area-type normal
+set protocols ospf interface eth0.20 cost '999'
+set protocols ospf interface eth0.20 dead-interval '4'
+set protocols ospf interface eth0.20 hello-interval '1'
+set protocols ospf interface eth0.20 priority '255'
+set protocols ospf interface eth0.20 retransmit-interval '5'
+set protocols ospf interface eth0.20 transmit-delay '1'
+set protocols ospf interface eth0.666 passive
+set protocols ospf log-adjacency-changes detail
+set protocols static route 0.0.0.0/0 next-hop 193.201.42.170 distance '130'
+set system config-management commit-revisions '100'
+set system host-name 'lab-vyos-r1'
+set system login user vyos authentication encrypted-password '$6$R.OnGzfXSfl6J$Iba/hl9bmjBs0VPtZ2zdW.Snh/nHuvxUwi0R6ruypgW63iKEbicJH.uUst8xZCyByURblxRtjAC1lAnYfIt.b0'
+set system login user vyos authentication plaintext-password ''
+set system console device ttyS0 speed '115200'
diff --git a/smoketest/configs/ospf-simple b/smoketest/configs/ospf-simple
new file mode 100644
index 000000000..0427062ae
--- /dev/null
+++ b/smoketest/configs/ospf-simple
@@ -0,0 +1,81 @@
+interfaces {
+    ethernet eth0 {
+        vif 20 {
+            address 193.201.42.173/28
+            ip {
+                ospf {
+                    cost 999
+                    dead-interval 4
+                    hello-interval 1
+                    priority 255
+                    retransmit-interval 5
+                    transmit-delay 1
+                }
+            }
+        }
+        vif 666 {
+            address 10.66.66.1/24
+        }
+    }
+    ethernet eth1 {
+    }
+    ethernet eth2 {
+    }
+    loopback lo {
+    }
+}
+protocols {
+    ospf {
+        area 0 {
+            area-type {
+                normal
+            }
+            network 193.201.42.160/28
+            network 10.66.66.0/24
+        }
+        log-adjacency-changes {
+            detail
+        }
+        passive-interface eth0.666
+    }
+    static {
+        route 0.0.0.0/0 {
+            next-hop 193.201.42.170 {
+                distance 130
+            }
+        }
+    }
+}
+system {
+    config-management {
+        commit-revisions 100
+    }
+    console {
+        device ttyS0 {
+            speed 115200
+        }
+    }
+    host-name lab-vyos-r1
+    login {
+        user vyos {
+            authentication {
+                encrypted-password $6$R.OnGzfXSfl6J$Iba/hl9bmjBs0VPtZ2zdW.Snh/nHuvxUwi0R6ruypgW63iKEbicJH.uUst8xZCyByURblxRtjAC1lAnYfIt.b0
+                plaintext-password ""
+            }
+        }
+    }
+    syslog {
+        global {
+            facility all {
+                level info
+            }
+            facility protocols {
+                level debug
+            }
+        }
+    }
+}
+
+// Warning: Do not remove the following line.
+// vyos-config-version: "broadcast-relay@1:cluster@1:config-management@1:conntrack@3:conntrack-sync@2:container@1:dhcp-relay@2:dhcp-server@6:dhcpv6-server@1:dns-forwarding@3:firewall@5:https@2:interfaces@22:ipoe-server@1:ipsec@5:isis@1:l2tp@3:lldp@1:mdns@1:nat@5:ntp@1:pppoe-server@5:pptp@2:qos@1:quagga@8:rpki@1:salt@1:snmp@2:ssh@2:sstp@3:system@21:vrrp@2:vyos-accel-ppp@2:wanloadbalance@3:webproxy@2:zone-policy@1"
+// Release version: 1.3.4
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
@@ -1,83 +1,84 @@
 #!/usr/bin/env python3
 #
 # Copyright (C) 2021-2024 VyOS maintainers and contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2 or later as
 # published by the Free Software Foundation.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # T3753: upgrade to FRR8 and move CLI options to better fit with the new FRR CLI
 
 from sys import argv
 from vyos.configtree import ConfigTree
 
 def ospf_passive_migration(config, ospf_base):
     if config.exists(ospf_base):
         if config.exists(ospf_base + ['passive-interface']):
             default = False
             for interface in config.return_values(ospf_base + ['passive-interface']):
                 if interface == 'default':
                     default = True
                     continue
                 config.set(ospf_base + ['interface', interface, 'passive'])
                 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']):
                 config.set(ospf_base + ['interface', interface, 'passive', 'disable'])
                 config.set_tag(ospf_base + ['interface'])
             config.delete(ospf_base + ['passive-interface-exclude'])
 
 if len(argv) < 2:
     print("Must specify file name!")
     exit(1)
 
 file_name = argv[1]
 
 with open(file_name, 'r') as f:
     config_file = f.read()
 
 config = ConfigTree(config_file)
 
 ospfv3_base = ['protocols', 'ospfv3']
 if config.exists(ospfv3_base):
     area_base = ospfv3_base + ['area']
     if config.exists(area_base):
         for area in config.list_nodes(area_base):
             if not config.exists(area_base + [area, 'interface']):
                 continue
 
             for interface in config.return_values(area_base + [area, 'interface']):
                 config.set(ospfv3_base + ['interface', interface, 'area'], value=area)
                 config.set_tag(ospfv3_base + ['interface'])
 
             config.delete(area_base + [area, 'interface'])
 
 # Migrate OSPF syntax in default VRF
 ospf_base = ['protocols', 'ospf']
 ospf_passive_migration(config, ospf_base)
 
 vrf_base = ['vrf', 'name']
 if config.exists(vrf_base):
     for vrf in config.list_nodes(vrf_base):
         vrf_ospf_base = vrf_base + [vrf, 'protocols', 'ospf']
         if config.exists(vrf_ospf_base):
             ospf_passive_migration(config, vrf_ospf_base)
 
 try:
     with open(file_name, 'w') as f:
         f.write(config.to_string())
 except OSError as e:
     print(f'Failed to save the modified config: {e}')
     exit(1)