From: Ben Pfaff Date: Tue, 17 Apr 2012 20:44:51 +0000 (-0700) Subject: ovs-vsctl: Verify correct record in cmd_get_fail_mode() for VLAN bridges. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d655c728e3ed88b2a09883980507de1652f60e91;p=openvswitch 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 --- 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); }