aboutsummaryrefslogtreecommitdiff
path: root/lib/cfm.c
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2012-07-20 13:07:49 -0700
committerEthan Jackson <ethan@nicira.com>2012-07-20 13:07:49 -0700
commit0d0c0bb535d0b305aabac5cc6f24e880808ff410 (patch)
treeb25ce078a86e0c820fb69533f4869c6e1cd9600c /lib/cfm.c
parentc3f72482ba4d375d2dd32de6f58ed4cdcef37ddd (diff)
cfm: Clear RDI on new CFM configurations.
When CFM is first configured, it detects no remote endpoints, and thus sets RDI on its CCMs. This can cause the receiver of these CCMs to think there is a problem when really things are simply initializing. This patch fixes the issue by not setting the RDI bit in CCMs until at least one fault interval has passed. Bug #12610. Reported-by: Paul Ingram <paul@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'lib/cfm.c')
-rw-r--r--lib/cfm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/cfm.c b/lib/cfm.c
index 65701781..134d8b78 100644
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -87,6 +87,7 @@ struct cfm {
uint64_t mpid;
bool extended; /* Extended mode. */
+ bool booted; /* A full fault interval has occured. */
enum cfm_fault_reason fault; /* Connectivity fault status. */
enum cfm_fault_reason recv_fault; /* Bit mask of faults occuring on
receive. */
@@ -407,6 +408,7 @@ cfm_run(struct cfm *cfm)
ds_destroy(&ds);
}
+ cfm->booted = true;
timer_set_duration(&cfm->fault_timer, interval);
VLOG_DBG("%s: new fault interval", cfm->name);
}
@@ -469,7 +471,7 @@ cfm_compose_ccm(struct cfm *cfm, struct ofpbuf *packet,
ccm->interval_ms_x = htons(0);
}
- if (hmap_is_empty(&cfm->remote_mps)) {
+ if (cfm->booted && hmap_is_empty(&cfm->remote_mps)) {
ccm->flags |= CCM_RDI_MASK;
}