diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-01-30 09:42:15 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-01-30 09:42:15 +0000 |
commit | bb43575771150e474f4ed723329520706d8c8cd7 (patch) | |
tree | f36f2c468ca8bfc56035c5a8c7e91355e92ad76b | |
parent | de65df0d91ed865bae985ddf88a9fcdfebd6fcec (diff) |
Prevent athn(4) from using RTS for non-data frames.
ok mpi@
-rw-r--r-- | sys/dev/ic/ar5008.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/ar9003.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/ic/ar5008.c b/sys/dev/ic/ar5008.c index 000d675c73c..b66e563850f 100644 --- a/sys/dev/ic/ar5008.c +++ b/sys/dev/ic/ar5008.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar5008.c,v 1.39 2017/01/22 10:17:37 dlg Exp $ */ +/* $OpenBSD: ar5008.c,v 1.40 2017/01/30 09:42:14 stsp Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -1500,7 +1500,9 @@ ar5008_tx(struct athn_softc *sc, struct mbuf *m, struct ieee80211_node *ni, ds->ds_ctl6 = SM(AR_TXC6_ENCR_TYPE, encrtype); /* Check if frame must be protected using RTS/CTS or CTS-to-self. */ - if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { + if (!IEEE80211_IS_MULTICAST(wh->i_addr1) && + (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == + IEEE80211_FC0_TYPE_DATA) { enum ieee80211_htprot htprot; htprot = (ic->ic_bss->ni_htop1 & IEEE80211_HTOP1_PROT_MASK); diff --git a/sys/dev/ic/ar9003.c b/sys/dev/ic/ar9003.c index ee91e04bbf1..74338f88705 100644 --- a/sys/dev/ic/ar9003.c +++ b/sys/dev/ic/ar9003.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar9003.c,v 1.43 2017/01/22 10:17:37 dlg Exp $ */ +/* $OpenBSD: ar9003.c,v 1.44 2017/01/30 09:42:14 stsp Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> @@ -1600,7 +1600,9 @@ ar9003_tx(struct athn_softc *sc, struct mbuf *m, struct ieee80211_node *ni, ds->ds_ctl17 = SM(AR_TXC17_ENCR_TYPE, encrtype); /* Check if frame must be protected using RTS/CTS or CTS-to-self. */ - if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { + if (!IEEE80211_IS_MULTICAST(wh->i_addr1) && + (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == + IEEE80211_FC0_TYPE_DATA) { /* NB: Group frames are sent using CCK in 802.11b/g. */ if (totlen > ic->ic_rtsthreshold) { ds->ds_ctl11 |= AR_TXC11_RTS_ENABLE; |