Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions
of the Linux kernel.  Patch by Yaniv Aknin.
diff --git a/Misc/ACKS b/Misc/ACKS
index 0bb62ae..af6a7be 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -14,6 +14,7 @@
 Jim Ahlstrom
 Farhan Ahmad
 Nir Aides
+Yaniv Aknin
 Jyrki Alakuijala
 Billy G. Allie
 Kevin Altis
diff --git a/Misc/NEWS b/Misc/NEWS
index 1f584f4..470c07c 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -31,6 +31,9 @@
 Library
 -------
 
+- Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions
+  of the Linux kernel.  Patch by Yaniv Aknin.
+
 - Issue #6312: Fixed http HEAD request when the transfer encoding is chunked.
   It should correctly return an empty response now.
 
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 901cb7d..0625acb 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1326,6 +1326,7 @@
 			char *straddr;
 
 			addr = (struct sockaddr_l2 *)addr_ret;
+			memset(addr, 0, sizeof(struct sockaddr_l2));
 			_BT_L2_MEMB(addr, family) = AF_BLUETOOTH;
 			if (!PyArg_ParseTuple(args, "si", &straddr,
 					      &_BT_L2_MEMB(addr, psm))) {