summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-03-31 16:12:01 -0700
committerEthan Jackson <ethan@nicira.com>2011-03-31 16:17:34 -0700
commit6fcdfcd065750940efd97b90f9746601d5b3f965 (patch)
tree34273b04bd9c97db5ec4ec4732348429545145de /lib
parent6d6ab93e9dcd91119ea9a1a843c1bb35e6754706 (diff)
downloadopenvswitch-6fcdfcd065750940efd97b90f9746601d5b3f965.tar.gz
cfm: Fix appctl negative report.
When the cfm module has never received a bad CCM message, it would report a negative time.
Diffstat (limited to 'lib')
-rw-r--r--lib/cfm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/cfm.c b/lib/cfm.c
index 4e5117d5b..fc7486e2f 100644
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -399,11 +399,14 @@ cfm_dump_ds(const struct cfm *cfm, struct ds *ds)
ds_put_format(ds, "\tinterval: %dms\n", cfmi->ccm_interval_ms);
ds_put_format(ds, "\ttime since CCM tx: %lldms\n", now - cfmi->ccm_sent);
- ds_put_format(ds, "\ttime since bad CCM rx: %lldms\n",
- now - cfmi->x_recv_time);
ds_put_format(ds, "\ttime since fault check: %lldms\n",
now - cfmi->fault_check);
+ if (cfmi->x_recv_time != LLONG_MIN) {
+ ds_put_format(ds, "\ttime since bad CCM rx: %lldms\n",
+ now - cfmi->x_recv_time);
+ }
+
ds_put_cstr(ds, "\n");
HMAP_FOR_EACH (rmp, node, &cfm->remote_mps) {
ds_put_format(ds, "Remote MPID %"PRIu16": %s\n", rmp->mpid,