1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
From 5a70378a47f541b0354fbb96770dd0a65ec552b8 Mon Sep 17 00:00:00 2001
From: Christian Breunig <christian@breunig.cc>
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 <christian@breunig.cc>
---
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
|