From 219aee02f3d29720f95269c3b1287299fbe68338 Mon Sep 17 00:00:00 2001
From: Quanah Gibson-Mount <quanah@openldap.org>
Date: Sun, 12 Dec 2010 03:12:07 +0000
Subject: [PATCH] ITS#6673

---
 CHANGES                   | 1 +
 libraries/libldap/tls_g.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGES b/CHANGES
index 3a9e211cbd..4f17948371 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,7 @@ OpenLDAP 2.4 Change Log
 OpenLDAP 2.4.24 Engineering
 	Fixed liblber to not close invalid sockets (ITS#6585)
 	Fixed libldap dnssrv port format specifier (ITS#6644)
+	Fixed libldap GnuTLS hang on socket close (ITS#6673)
 	Fixed libldap sasl partial write handling (ITS#6639)
 	Fixed libldap url parsing with NULL host (ITS#6653)
 	Fixed ldapsearch segfault with deref (ITS#6638)
diff --git a/libraries/libldap/tls_g.c b/libraries/libldap/tls_g.c
index f49147a36c..f5076cdb99 100644
--- a/libraries/libldap/tls_g.c
+++ b/libraries/libldap/tls_g.c
@@ -967,7 +967,7 @@ tlsg_sb_close( Sockbuf_IO_Desc *sbiod )
 	assert( sbiod->sbiod_pvt != NULL );
 
 	p = (struct tls_data *)sbiod->sbiod_pvt;
-	gnutls_bye ( p->session->session, GNUTLS_SHUT_RDWR );
+	gnutls_bye ( p->session->session, GNUTLS_SHUT_WR );
 	return 0;
 }
 
-- 
GitLab