From 175106cbf653dde9668f0401ff573428974f62fe Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 17 Dec 2009 15:53:43 -0800 Subject: [PATCH] ovs-vsctl: Fix segfault with fake bridges. A fake bridge has no br_cfg, so we can't dereference it. There is a similar problem in cmd_set_controller() and cmd_del_controller() but this commit does not fix it. --- utilities/ovs-vsctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index 852db3ae..c60fd433 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -386,7 +386,7 @@ add_bridge(struct vsctl_info *b, br->name = xstrdup(name); br->parent = parent; br->vlan = vlan; - br->ctrl = br_cfg->controller; + br->ctrl = parent ? parent->br_cfg->controller : br_cfg->controller; shash_add(&b->bridges, br->name, br); return br; } -- 2.30.2