When built with Clang, vswitchd segfaulted in ovsrec_open_vswitch_init,
from calling memset() on a const struct.

Signed-off-by: Ed Maste <ema...@freebsd.org>
---
 vswitchd/bridge.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index b1d2feb..cb94fa0 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -2105,7 +2105,7 @@ bridge_run_fast(void)
 void
 bridge_run(void)
 {
-    static const struct ovsrec_open_vswitch null_cfg;
+    static struct ovsrec_open_vswitch null_cfg;
     const struct ovsrec_open_vswitch *cfg;
     struct ovsdb_idl_txn *reconf_txn = NULL;
     struct sset types;
@@ -2114,7 +2114,7 @@ bridge_run(void)
     bool vlan_splinters_changed;
     struct bridge *br;
 
-    ovsrec_open_vswitch_init((struct ovsrec_open_vswitch *) &null_cfg);
+    ovsrec_open_vswitch_init(&null_cfg);
 
     /* (Re)configure if necessary. */
     if (!reconfiguring) {
-- 
1.7.11.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to