From e04ab7ae8feb2c55b9b9730b59d8b72e85a0ffcb Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 17 Jul 2017 09:54:54 -0700 Subject: connmgr: Fix crash when in_band_create() fails. update_in_band_remotes() created an in-band manager and then tried to work with it without first checking whether creation had succeeded. If it failed, this led to a segfault. Reported-by: Numan Siddique Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-July/335530.html Signed-off-by: Ben Pfaff Acked-by: Justin Pettit --- ofproto/connmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index 95643900c..82a6ab05f 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -766,12 +766,12 @@ update_in_band_remotes(struct connmgr *mgr) if (!mgr->in_band) { in_band_create(mgr->ofproto, mgr->local_port_name, &mgr->in_band); } - in_band_set_queue(mgr->in_band, mgr->in_band_queue); } else { /* in_band_run() needs a chance to delete any existing in-band flows. * We will destroy mgr->in_band after it's done with that. */ } if (mgr->in_band) { + in_band_set_queue(mgr->in_band, mgr->in_band_queue); in_band_set_remotes(mgr->in_band, addrs, n_addrs); } -- cgit v1.2.1