/* CFM status query. */
struct ofproto_cfm_status {
enum cfm_fault_reason faults; /* 0 if not faulted. */
- bool remote_opstate; /* True if remote CFM endpoint is up. */
int health; /* Health status in [0,100] range. */
+ /* 0 if the remote CFM endpoint is operationally down,
+ * 1 if the remote CFM endpoint is operationally up,
+ * -1 if we don't know because the remote CFM endpoint is not in extended
+ * mode. */
+ int remote_opstate;
+
/* MPIDs of remote maintenance points whose CCMs have been received. */
const uint64_t *rmps;
size_t n_rmps;
}
ovsrec_interface_set_cfm_fault_status(cfg, (char **) reasons, j);
- ovsrec_interface_set_cfm_remote_opstate(cfg, (status.remote_opstate
- ? "up" : "down"));
+ if (status.remote_opstate >= 0) {
+ const char *remote_opstate = status.remote_opstate ? "up" : "down";
+ ovsrec_interface_set_cfm_remote_opstate(cfg, remote_opstate);
+ } else {
+ ovsrec_interface_set_cfm_remote_opstate(cfg, NULL);
+ }
+
ovsrec_interface_set_cfm_remote_mpids(cfg,
(const int64_t *)status.rmps,
status.n_rmps);