]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: fix internal ldp-sync state flags when feature is disabled
authorChristian Breunig <christian@breunig.cc>
Sat, 13 Jul 2024 06:43:36 +0000 (08:43 +0200)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 23 Jul 2024 14:54:01 +0000 (14:54 +0000)
When enabling "mpls ldp-sync" under "router ospf" ospfd configures
SET_FLAG(ldp_sync_info->flags, LDP_SYNC_FLAG_IF_CONFIG) so internally knowing
that the ldp-sync feature is enabled. However the flag is not cleared when
turning of the feature using "nompls ldp-sync"!

https://github.com/FRRouting/frr/issues/16375

Signed-off-by: Christian Breunig <christian@breunig.cc>
(cherry picked from commit 5a70378a47f541b0354fbb96770dd0a65ec552b8)

ospfd/ospf_ldp_sync.c
tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync.ref
tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync_r1_eth1_shutdown.ref
tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync_r2_eth1_shutdown.ref
tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync.ref
tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync_r1_eth1_shutdown.ref
tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync_r2_eth1_shutdown.ref

index 4aab880d22803739e6b3df081604dfc75355a94a..cba5a9ca37f4bfa57f05233812d8abf294121ed7 100644 (file)
@@ -901,7 +901,7 @@ DEFPY (no_mpls_ldp_sync,
         *  stop holddown timer if running
         *  restore ospf cost
         */
-       SET_FLAG(ldp_sync_info->flags, LDP_SYNC_FLAG_IF_CONFIG);
+       UNSET_FLAG(ldp_sync_info->flags, LDP_SYNC_FLAG_IF_CONFIG);
        ldp_sync_info->enabled = LDP_IGP_SYNC_DEFAULT;
        ldp_sync_info->state = LDP_IGP_SYNC_STATE_NOT_REQUIRED;
        EVENT_OFF(ldp_sync_info->t_holddown);
index 6c27a10427600b8145929b1937edd4f0029f9a35..846be5b849c93ef098b70bf9c0bb8b9c179859f0 100644 (file)
@@ -5,8 +5,8 @@
     "ldpIgpSyncState":"Sync achieved"
   },
   "r2-eth2":{
-    "ldpIgpSyncEnabled":false,
+    "ldpIgpSyncEnabled":true,
     "holdDownTimeInSec":50,
-    "ldpIgpSyncState":"Sync not required"
+    "ldpIgpSyncState":"Sync achieved"
   }
 }
index 889f69ed7f40bc0b3556142a1082ad452cccc7ea..ad3b8b5ca442fd476c410dee56f63ce2a0420bb9 100644 (file)
@@ -5,8 +5,8 @@
     "ldpIgpSyncState":"Holding down until Sync"
   },
   "r2-eth2":{
-    "ldpIgpSyncEnabled":false,
+    "ldpIgpSyncEnabled":true,
     "holdDownTimeInSec":50,
-    "ldpIgpSyncState":"Sync not required"
+    "ldpIgpSyncState":"Sync achieved"
   }
 }
index d9036e124bca1f23781e610257728d46e97a00c3..d5e4b88d07cd6d954e35e40104e07df5e43d03b2 100644 (file)
@@ -1,7 +1,7 @@
 {
   "r2-eth2":{
-    "ldpIgpSyncEnabled":false,
+    "ldpIgpSyncEnabled":true,
     "holdDownTimeInSec":50,
-    "ldpIgpSyncState":"Sync not required"
+    "ldpIgpSyncState":"Sync achieved"
   }
 }
index b417ab040ab5e7b57eba91b757710291f5ba1d13..5b9542d5a996d5452ae62adf0d80c174a05b7094 100644 (file)
@@ -1,8 +1,8 @@
 {
   "r3-eth1":{
-    "ldpIgpSyncEnabled":false,
+    "ldpIgpSyncEnabled":true,
     "holdDownTimeInSec":50,
-    "ldpIgpSyncState":"Sync not required"
+    "ldpIgpSyncState":"Sync achieved"
   },
   "r3-eth2":{
     "ldpIgpSyncEnabled":true,
index b417ab040ab5e7b57eba91b757710291f5ba1d13..5b9542d5a996d5452ae62adf0d80c174a05b7094 100644 (file)
@@ -1,8 +1,8 @@
 {
   "r3-eth1":{
-    "ldpIgpSyncEnabled":false,
+    "ldpIgpSyncEnabled":true,
     "holdDownTimeInSec":50,
-    "ldpIgpSyncState":"Sync not required"
+    "ldpIgpSyncState":"Sync achieved"
   },
   "r3-eth2":{
     "ldpIgpSyncEnabled":true,
index b417ab040ab5e7b57eba91b757710291f5ba1d13..5b9542d5a996d5452ae62adf0d80c174a05b7094 100644 (file)
@@ -1,8 +1,8 @@
 {
   "r3-eth1":{
-    "ldpIgpSyncEnabled":false,
+    "ldpIgpSyncEnabled":true,
     "holdDownTimeInSec":50,
-    "ldpIgpSyncState":"Sync not required"
+    "ldpIgpSyncState":"Sync achieved"
   },
   "r3-eth2":{
     "ldpIgpSyncEnabled":true,