[ovs-dev] [PATCH] ovs-vsctl: Print correct fail-mode

Justin Pettit jpettit at nicira.com
Mon Jan 11 17:00:10 PST 2010


When printing the fail-mode, ovs-vsctl would always attempt to print the
top-level one--even if it didn't exist.  So, in addition to sometimes
being wrong, it could cause segfaults.

Thanks to Peter Balland for reporting the error.

Bug #2374
---
 utilities/ovs-vsctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c
index 3a73a23..725988a 100644
--- a/utilities/ovs-vsctl.c
+++ b/utilities/ovs-vsctl.c
@@ -1345,7 +1345,7 @@ cmd_get_fail_mode(struct vsctl_context *ctx)
     }
 
     if (fail_mode && strlen(fail_mode)) {
-        ds_put_format(&ctx->output, "%s\n", info.ctrl->fail_mode);
+        ds_put_format(&ctx->output, "%s\n", fail_mode);
     }
 
     free_info(&info);
-- 
1.6.5.5





More information about the dev mailing list