summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2020-07-13 08:31:33 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2020-07-13 08:31:33 +0000
commit49bcb32d18511843672ff708bf284e994d654fbd (patch)
tree4471e16e3dc538af092b354c22d97721244cef7c /sys
parentdfd0f6b10544712a90638e66826fe66ddfe1d875 (diff)
When athn(4) is deciding how to decrypt an incoming frame, look into the
ieee80211_node data structure to find the WPA group cipher which was negotiated with the peer, rather than checking the wireless interface's configuration data. Found while investigating a problem where WPA2+TKIP wasn't working with athn. Problem reported by Tim Chase.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/ar5008.c4
-rw-r--r--sys/dev/usb/if_athn_usb.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/ar5008.c b/sys/dev/ic/ar5008.c
index 70dbaf422bd..826eb04783b 100644
--- a/sys/dev/ic/ar5008.c
+++ b/sys/dev/ic/ar5008.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5008.c,v 1.60 2020/07/06 11:28:51 stsp Exp $ */
+/* $OpenBSD: ar5008.c,v 1.61 2020/07/13 08:31:32 stsp Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -1005,7 +1005,7 @@ ar5008_rx_process(struct athn_softc *sc, struct mbuf_list *ml)
(ni->ni_flags & IEEE80211_NODE_RXPROT) &&
(ni->ni_rsncipher == IEEE80211_CIPHER_CCMP ||
(IEEE80211_IS_MULTICAST(wh->i_addr1) &&
- ic->ic_rsngroupcipher == IEEE80211_CIPHER_CCMP))) {
+ ni->ni_rsngroupcipher == IEEE80211_CIPHER_CCMP))) {
if (ar5008_ccmp_decap(sc, m, ni) != 0) {
ifp->if_ierrors++;
ieee80211_release_node(ic, ni);
diff --git a/sys/dev/usb/if_athn_usb.c b/sys/dev/usb/if_athn_usb.c
index 097ce3ad0e9..21a302f5066 100644
--- a/sys/dev/usb/if_athn_usb.c
+++ b/sys/dev/usb/if_athn_usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_athn_usb.c,v 1.57 2020/07/10 13:22:21 patrick Exp $ */
+/* $OpenBSD: if_athn_usb.c,v 1.58 2020/07/13 08:31:32 stsp Exp $ */
/*-
* Copyright (c) 2011 Damien Bergamini <damien.bergamini@free.fr>
@@ -2085,7 +2085,7 @@ athn_usb_rx_frame(struct athn_usb_softc *usc, struct mbuf *m,
(ni->ni_flags & IEEE80211_NODE_RXPROT) &&
(ni->ni_rsncipher == IEEE80211_CIPHER_CCMP ||
(IEEE80211_IS_MULTICAST(wh->i_addr1) &&
- ic->ic_rsngroupcipher == IEEE80211_CIPHER_CCMP))) {
+ ni->ni_rsngroupcipher == IEEE80211_CIPHER_CCMP))) {
if (ar5008_ccmp_decap(sc, m, ni) != 0) {
ifp->if_ierrors++;
ieee80211_release_node(ic, ni);