summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-11-06 08:53:45 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2013-11-06 08:53:45 +0100
commit078bce41bcca438bb7513dceae3b77f43875ce1b (patch)
treed6c061d7d18a948ed87356e2dae2b31b7774616e
parent9ce82277e6be7e4c215b074c6c7f2c71f7edc332 (diff)
owfd: wpa: fix mac-parser
We actually need to parse hex numbers, not decimal numbers. Fix the mac parser to account for that. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
-rw-r--r--src/wpa_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wpa_parser.c b/src/wpa_parser.c
index c65d55f..02f91e4 100644
--- a/src/wpa_parser.c
+++ b/src/wpa_parser.c
@@ -177,7 +177,7 @@ static int parse_mac(char *buf, const char *src)
if (strlen(src) > 17)
return -EINVAL;
- r = sscanf(src, "%2d:%2d:%2d:%2d:%2d:%2d",
+ r = sscanf(src, "%2x:%2x:%2x:%2x:%2x:%2x",
&a1, &a2, &a3, &a4, &a5, &a6);
if (r != 6)
return -EINVAL;