summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorppatience0 <ppatience0@gmail.com>2013-06-22 09:27:56 -0400
committerppatience0 <ppatience0@gmail.com>2013-06-22 09:27:56 -0400
commit6a1f3823bbadb7a779423e21575fb38f52ae9b22 (patch)
tree3dd5985145a4592b7b91b8923de644e0ad564f0b
parent58f8d7874b01892553ac5679d6f784dc1fa0949b (diff)
downloadplan9front-6a1f3823bbadb7a779423e21575fb38f52ae9b22.tar.xz
wpa: s/peerwise/pairwise/g, fix bug where p is not incremented after
reading wpa1oui into w, making the later memcmp with wpatkipoui bogus.
-rw-r--r--sys/src/cmd/aux/wpa.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/src/cmd/aux/wpa.c b/sys/src/cmd/aux/wpa.c
index 26b6bffe6..9fe765814 100644
--- a/sys/src/cmd/aux/wpa.c
+++ b/sys/src/cmd/aux/wpa.c
@@ -75,8 +75,8 @@ uchar rsnie[] = {
0x14, /* length */
0x01, 0x00, /* version 1 */
0x00, 0x0F, 0xAC, 0x04, /* group cipher suite CCMP */
- 0x01, 0x00, /* peerwise cipher suite count 1 */
- 0x00, 0x0F, 0xAC, 0x04, /* peerwise cipher suite CCMP */
+ 0x01, 0x00, /* pairwise cipher suite count 1 */
+ 0x00, 0x0F, 0xAC, 0x04, /* pairwise cipher suite CCMP */
0x01, 0x00, /* authentication suite count 1 */
0x00, 0x0F, 0xAC, 0x02, /* authentication suite PSK */
0x00, 0x00, /* capabilities */
@@ -92,8 +92,8 @@ uchar wpaie[] = {
0x00, 0x50, 0xf2, 0x01, /* WPAIE type 1 */
0x01, 0x00, /* version 1 */
0x00, 0x50, 0xf2, 0x02, /* group cipher suite TKIP */
- 0x01, 0x00, /* peerwise cipher suite count 1 */
- 0x00, 0x50, 0xf2, 0x02, /* peerwise cipher suite TKIP */
+ 0x01, 0x00, /* pairwise cipher suite count 1 */
+ 0x00, 0x50, 0xf2, 0x02, /* pairwise cipher suite TKIP */
0x01, 0x00, /* authentication suite count 1 */
0x00, 0x50, 0xf2, 0x02, /* authentication suite PSK */
};
@@ -194,6 +194,7 @@ trunc: sysfatal("invalid or truncated RSNE; brsne: %s", buf);
memmove(w, wpa1oui, 4);
w += 4;
+ p += 4;
} else {
sysfatal("unrecognized RSNE type; brsne: %s", buf);
return 0;
@@ -775,7 +776,7 @@ main(int argc, char *argv[])
tsc = rsc;
rsc = 0LL;
}
- /* install peerwise receive key */
+ /* install pairwise receive key */
if(fprint(cfd, "rxkey %.*H %s:%.*H@%llux", Eaddrlen, amac,
peercipher->name, peercipher->keylen, ptk+32, tsc) < 0)
sysfatal("write rxkey: %r");
@@ -790,7 +791,7 @@ main(int argc, char *argv[])
reply(smac, amac, flags & ~(Fack|Fenc|Fsec), kd, nil, 0);
sleep(100);
- /* install peerwise transmit key */
+ /* install pairwise transmit key */
if(fprint(cfd, "txkey %.*H %s:%.*H@%llux", Eaddrlen, amac,
peercipher->name, peercipher->keylen, ptk+32, tsc) < 0)
sysfatal("write txkey: %r");