A VLAN bridge uses its parent's controllers, so checking the controller
should verify the parent's set of controllers.
The change to verify_controllers() isn't necessary; it just deletes
the check for a null 'bridge' because verify_controllers() can no
longer be called with a null 'bridge'.
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 <blp@nicira.com>
static void
verify_controllers(struct ovsrec_bridge *bridge)
{
- if (bridge) {
- size_t i;
+ size_t i;
- ovsrec_bridge_verify_controller(bridge);
- for (i = 0; i < bridge->n_controller; i++) {
- ovsrec_controller_verify_target(bridge->controller[i]);
- }
+ ovsrec_bridge_verify_controller(bridge);
+ for (i = 0; i < bridge->n_controller; i++) {
+ ovsrec_controller_verify_target(bridge->controller[i]);
}
}
get_info(ctx, &info);
br = find_bridge(&info, ctx->argv[1], true);
+ if (br->parent) {
+ br = br->parent;
+ }
verify_controllers(br->br_cfg);
/* Print the targets in sorted order for reproducibility. */