summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2017-07-17 09:54:54 -0700
committerBen Pfaff <blp@ovn.org>2017-07-17 10:14:43 -0700
commitdcb9da319dba94caf7629508bb5c2ef34859cb1c (patch)
tree40ef2eb6cc924e29c5ba04ed4decf8148da3a7d1
parentd2395cd7238a2a6a47c7a5c7d671fdede829b5fc (diff)
downloadopenvswitch-dcb9da319dba94caf7629508bb5c2ef34859cb1c.tar.gz
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 <nusiddiq@redhat.com> Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-July/335530.html Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
-rw-r--r--ofproto/connmgr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c
index a48f6ede0..ebe71e5d7 100644
--- a/ofproto/connmgr.c
+++ b/ofproto/connmgr.c
@@ -752,12 +752,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);
}