summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2007-08-01 12:26:17 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2007-08-01 12:26:17 +0000
commit8d11e8f2ae4bd77dcd29ef4f99061c9a7510335a (patch)
tree4ed6fc3ca4fe558138e26b6027726337aa3e89cb /sys
parent1de126f3ece51d8eed80a29bffc74071f997db87 (diff)
fix parsing and construction of RSN/WPA IEs.
Diffstat (limited to 'sys')
-rw-r--r--sys/net80211/ieee80211_input.c4
-rw-r--r--sys/net80211/ieee80211_output.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index d7301264511..9d2816a14b2 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -1,5 +1,5 @@
/* $NetBSD: ieee80211_input.c,v 1.24 2004/05/31 11:12:24 dyoung Exp $ */
-/* $OpenBSD: ieee80211_input.c,v 1.48 2007/08/01 12:23:26 damien Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.49 2007/08/01 12:26:16 damien Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
* Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
@@ -1052,7 +1052,7 @@ ieee80211_parse_wpa1(struct ieee80211com *ic, struct ieee80211_node *ni,
ic->ic_stats.is_rx_elem_toosmall++;
return IEEE80211_REASON_IE_INVALID;
}
- return ieee80211_parse_rsn_body(ic, ni, frm + 6, frm[1] - 6);
+ return ieee80211_parse_rsn_body(ic, ni, frm + 6, frm[1] - 4);
}
/*-
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 458fc568e23..0392ad17a55 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_output.c,v 1.50 2007/08/01 12:15:48 damien Exp $ */
+/* $OpenBSD: ieee80211_output.c,v 1.51 2007/08/01 12:26:16 damien Exp $ */
/* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */
/*-
@@ -900,7 +900,7 @@ ieee80211_add_rsn(u_int8_t *frm, struct ieee80211com *ic,
frm = ieee80211_add_rsn_body(frm, ic, ni, 0);
/* write length field */
- *plen = frm - plen + 1;
+ *plen = frm - plen - 1;
return frm;
}
@@ -921,7 +921,7 @@ ieee80211_add_wpa1(u_int8_t *frm, struct ieee80211com *ic,
frm = ieee80211_add_rsn_body(frm, ic, ni, 1);
/* write length field */
- *plen = frm - plen + 1;
+ *plen = frm - plen - 1;
return frm;
}