From: Ben Pfaff Date: Thu, 17 Dec 2009 23:53:43 +0000 (-0800) Subject: ovs-vsctl: Fix segfault with fake bridges. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=175106cbf653dde9668f0401ff573428974f62fe;p=openvswitch 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. --- 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; }