projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b420b49
)
service: a wps pin of length 0 is valid and leads to pbc method usage
author
Tomasz Bursztyka
<tomasz.bursztyka@linux.intel.com>
Tue, 24 Apr 2012 14:15:57 +0000
(17:15 +0300)
committer
Marcel Holtmann
<marcel@holtmann.org>
Tue, 24 Apr 2012 14:14:42 +0000
(16:14 +0200)
src/service.c
patch
|
blob
|
history
diff --git
a/src/service.c
b/src/service.c
index
e919b01
..
2219a01
100644
(file)
--- a/
src/service.c
+++ b/
src/service.c
@@
-4361,15
+4361,22
@@
int __connman_service_add_passphrase(struct connman_service *service,
static int check_wpspin(const char *wpspin)
{
+ int length;
guint i;
if (wpspin == NULL)
return 0;
+ length = strlen(wpspin);
+
+ /* If 0, it will mean user wants to use PBC method */
+ if (length == 0)
+ return 0;
+
/* A WPS PIN is always 8 chars length,
* its content is in digit representation.
*/
- if (
strlen(wpspin)
!= 8)
+ if (
length
!= 8)
return -ENOKEY;
for (i = 0; i < 8; i++)