Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frr: T6600: apply pending upstream patch for ospfd ldp-sync #704

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
From 5a70378a47f541b0354fbb96770dd0a65ec552b8 Mon Sep 17 00:00:00 2001
From: Christian Breunig <[email protected]>
Date: Sat, 13 Jul 2024 08:43:36 +0200
Subject: [PATCH] ospfd: fix internal ldp-sync state flags when feature is
disabled

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 <[email protected]>
---
ospfd/ospf_ldp_sync.c | 2 +-
tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync.ref | 4 ++--
.../r2/show_ospf_ldp_sync_r1_eth1_shutdown.ref | 4 ++--
.../r2/show_ospf_ldp_sync_r2_eth1_shutdown.ref | 4 ++--
tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync.ref | 4 ++--
.../r3/show_ospf_ldp_sync_r1_eth1_shutdown.ref | 4 ++--
.../r3/show_ospf_ldp_sync_r2_eth1_shutdown.ref | 4 ++--
7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/ospfd/ospf_ldp_sync.c b/ospfd/ospf_ldp_sync.c
index d1ef85c9a..496ae5b4b 100644
--- a/ospfd/ospf_ldp_sync.c
+++ b/ospfd/ospf_ldp_sync.c
@@ -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);
diff --git a/tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync.ref b/tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync.ref
index 6c27a1042..846be5b84 100644
--- a/tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync.ref
+++ b/tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync.ref
@@ -5,8 +5,8 @@
"ldpIgpSyncState":"Sync achieved"
},
"r2-eth2":{
- "ldpIgpSyncEnabled":false,
+ "ldpIgpSyncEnabled":true,
"holdDownTimeInSec":50,
- "ldpIgpSyncState":"Sync not required"
+ "ldpIgpSyncState":"Sync achieved"
}
}
diff --git a/tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync_r1_eth1_shutdown.ref b/tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync_r1_eth1_shutdown.ref
index 889f69ed7..ad3b8b5ca 100644
--- a/tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync_r1_eth1_shutdown.ref
+++ b/tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync_r1_eth1_shutdown.ref
@@ -5,8 +5,8 @@
"ldpIgpSyncState":"Holding down until Sync"
},
"r2-eth2":{
- "ldpIgpSyncEnabled":false,
+ "ldpIgpSyncEnabled":true,
"holdDownTimeInSec":50,
- "ldpIgpSyncState":"Sync not required"
+ "ldpIgpSyncState":"Sync achieved"
}
}
diff --git a/tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync_r2_eth1_shutdown.ref b/tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync_r2_eth1_shutdown.ref
index d9036e124..d5e4b88d0 100644
--- a/tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync_r2_eth1_shutdown.ref
+++ b/tests/topotests/ldp_sync_ospf_topo1/r2/show_ospf_ldp_sync_r2_eth1_shutdown.ref
@@ -1,7 +1,7 @@
{
"r2-eth2":{
- "ldpIgpSyncEnabled":false,
+ "ldpIgpSyncEnabled":true,
"holdDownTimeInSec":50,
- "ldpIgpSyncState":"Sync not required"
+ "ldpIgpSyncState":"Sync achieved"
}
}
diff --git a/tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync.ref b/tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync.ref
index b417ab040..5b9542d5a 100644
--- a/tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync.ref
+++ b/tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync.ref
@@ -1,8 +1,8 @@
{
"r3-eth1":{
- "ldpIgpSyncEnabled":false,
+ "ldpIgpSyncEnabled":true,
"holdDownTimeInSec":50,
- "ldpIgpSyncState":"Sync not required"
+ "ldpIgpSyncState":"Sync achieved"
},
"r3-eth2":{
"ldpIgpSyncEnabled":true,
diff --git a/tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync_r1_eth1_shutdown.ref b/tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync_r1_eth1_shutdown.ref
index b417ab040..5b9542d5a 100644
--- a/tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync_r1_eth1_shutdown.ref
+++ b/tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync_r1_eth1_shutdown.ref
@@ -1,8 +1,8 @@
{
"r3-eth1":{
- "ldpIgpSyncEnabled":false,
+ "ldpIgpSyncEnabled":true,
"holdDownTimeInSec":50,
- "ldpIgpSyncState":"Sync not required"
+ "ldpIgpSyncState":"Sync achieved"
},
"r3-eth2":{
"ldpIgpSyncEnabled":true,
diff --git a/tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync_r2_eth1_shutdown.ref b/tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync_r2_eth1_shutdown.ref
index b417ab040..5b9542d5a 100644
--- a/tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync_r2_eth1_shutdown.ref
+++ b/tests/topotests/ldp_sync_ospf_topo1/r3/show_ospf_ldp_sync_r2_eth1_shutdown.ref
@@ -1,8 +1,8 @@
{
"r3-eth1":{
- "ldpIgpSyncEnabled":false,
+ "ldpIgpSyncEnabled":true,
"holdDownTimeInSec":50,
- "ldpIgpSyncState":"Sync not required"
+ "ldpIgpSyncState":"Sync achieved"
},
"r3-eth2":{
"ldpIgpSyncEnabled":true,
--
2.39.2

Loading