bridge: Segfault when missing Open vSwitch table.
authorEthan Jackson <ethan@nicira.com>
Wed, 18 Jul 2012 17:56:21 +0000 (10:56 -0700)
committerEthan Jackson <ethan@nicira.com>
Wed, 18 Jul 2012 18:17:07 +0000 (11:17 -0700)
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 <ethan@nicira.com>
vswitchd/bridge.c

index a36705baaa9a9d6fcb616bec0cf92e05dcfb30d0..2c1142b2c8b22c9e79ad0360ce4bc306212acc7a 100644 (file)
@@ -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);