summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-01-13 17:55:54 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-01-13 17:55:54 +0100
commit7b5212174affc3834d32b68b07370810f9592cb1 (patch)
tree3fbecfe6bbae3939b0325be8d180d91499462bb1
parentfb0f770fa309940ef03fec8f58624a478cbcb8bd (diff)
Allow choosing of MITM for new pairing function
-rw-r--r--test/l2test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/l2test.c b/test/l2test.c
index babef00c..b760ddd8 100644
--- a/test/l2test.c
+++ b/test/l2test.c
@@ -861,7 +861,10 @@ static void do_pairing(char *svr)
goto failed;
}
- opt = L2CAP_LM_SECURE;
+ if (secure)
+ opt = L2CAP_LM_SECURE;
+ else
+ opt = L2CAP_LM_ENCRYPT;
if (setsockopt(sk, SOL_L2CAP, L2CAP_LM, &opt, sizeof(opt)) < 0) {
perror("Can't set link mode");