From: Ethan Jackson Date: Wed, 18 Jul 2012 17:56:21 +0000 (-0700) Subject: bridge: Segfault when missing Open vSwitch table. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edce886c92dc34797a36fd9dd20c530e1799f082;p=openvswitch bridge: Segfault when missing Open vSwitch table. The enable_system_stats() function calls smap_get_bool() on the ovsrec_open_vswitch passed to it. This was segmentation faulting when 'null_cfg' defined in bridge_reconfigure() was used because there was no Open vSwitch table. Signed-off-by: Ethan Jackson --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index a36705ba..2c1142b2 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2018,6 +2018,8 @@ bridge_run(void) bool vlan_splinters_changed; struct bridge *br; + ovsrec_open_vswitch_init((struct ovsrec_open_vswitch *) &null_cfg); + /* (Re)configure if necessary. */ if (!reconfiguring) { ovsdb_idl_run(idl);