summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bluetooth/btpand/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bluetooth/btpand/server.c')
-rw-r--r--usr.sbin/bluetooth/btpand/server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/bluetooth/btpand/server.c b/usr.sbin/bluetooth/btpand/server.c
index b24d416..b72b032 100644
--- a/usr.sbin/bluetooth/btpand/server.c
+++ b/usr.sbin/bluetooth/btpand/server.c
@@ -32,6 +32,7 @@ __RCSID("$NetBSD: server.c,v 1.2 2009/01/24 17:29:28 plunky Exp $");
#include <sys/ioctl.h>
+#define L2CAP_SOCKET_CHECKED
#include <bluetooth.h>
#include <inttypes.h>
#include <errno.h>
@@ -103,6 +104,9 @@ server_open(void)
sa.l2cap_family = AF_BLUETOOTH;
sa.l2cap_len = sizeof(sa);
sa.l2cap_psm = htole16(l2cap_psm);
+ sa.l2cap_bdaddr_type = BDADDR_BREDR;
+ sa.l2cap_cid = 0;
+
bdaddr_copy(&sa.l2cap_bdaddr, &local_bdaddr);
if (bind(server_fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) {
log_err("Could not bind server socket: %m");
OpenPOWER on IntegriCloud