From d655c728e3ed88b2a09883980507de1652f60e91 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 17 Apr 2012 13:44:51 -0700 Subject: [PATCH] ovs-vsctl: Verify correct record in cmd_get_fail_mode() for VLAN bridges. A VLAN bridge uses its parent's fail-mode, so checking the fail-mode should verify the parent's bridge record. This fixes a bug, but it is unlikely to ever have caused a real problem for users. Found by inspection. Signed-off-by: Ben Pfaff --- utilities/ovs-vsctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index a5bd6474..567defb1 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -2071,9 +2071,8 @@ cmd_get_fail_mode(struct vsctl_context *ctx) get_info(ctx, &info); br = find_bridge(&info, ctx->argv[1], true); - if (br->br_cfg) { - ovsrec_bridge_verify_fail_mode(br->br_cfg); - } + ovsrec_bridge_verify_fail_mode(br->br_cfg + ? br->br_cfg : br->parent->br_cfg); if (br->fail_mode && strlen(br->fail_mode)) { ds_put_format(&ctx->output, "%s\n", br->fail_mode); } -- 2.30.2