freebsd-dev/sys/net80211
Adrian Chadd 2172664c4b [net80211] Use the unicast key when transmitting DWDS AP multicast frames.
I'm still not sure whether this is the full solution, but here goes.

I have a two node DWDS setup - a main AP with the ethernet bridge uplink
and a satellite AP in the back of the house. They're both AR9344+AR9580
dual band 11n APs.

The problem was that multicast frames was not going from the DWDS AP to
the DWDS STA. Unicast frames are fine, and multicast frames from the
DWDS STA to AP are fine.

Now, multicast and unicast frames from the STA -> AP are just transmitted
using the unicast key.  That's fine.  However, the AP -> STA multicast
frames by default are transmitted using the current default / multicast
key, the shared one between all STAs in a BSS.  Now, the DWDS implementation
ignores non WDS frames - it only allows about 4 address frames outside
of management / EAPOL frames! - so the STA side ignores the normal multicast
frames.

Instead, the AP side uses ieee80211_dwds_mcast() to send multicast frames
to each WDS VAP that was created as part of the "dynamic" part of DWDS.
This should be queuing them individually to each node instead of using
the normal multicast send path; and this is how they should get turned into
4-addr WDS frames.

HOWEVER, ieee80211_encap() was trying to use the default TX key to queue
them rather than the unicast key that's already setup.  Since this synthetic
node doesn't have the default TX key setup, transmission fails.  Things
would be fine in WEP and in open mode because in both cases you would
have static keys (or no keys) setup.  It just fails in WPA mode.

This resolves the issue.  AP DWDS multicast is now sent using the unicast
key just like in STA mode and I'm pretty sure the STA mode side will stil
work fine (as it's a STA VAP with a DWDS flag..)

Tested:

* TL-WDR3600/4300 APs
2020-05-08 17:01:33 +00:00
..
_ieee80211.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_acl.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_action.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_action.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_adhoc.c net80211(4): hide casts for 'i_seq' field offset calculation inside 2019-02-10 23:58:56 +00:00
ieee80211_adhoc.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_ageq.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_ageq.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_alq.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
ieee80211_alq.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_amrr.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
ieee80211_amrr.h
ieee80211_crypto_ccmp.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_crypto_none.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_crypto_tkip.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_crypto_wep.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_crypto.c net80211: drop m_pullup call from ieee80211_crypto_decap. 2019-01-19 16:04:26 +00:00
ieee80211_crypto.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_ddb.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_dfs.c Do not acquire IEEE80211_LOCK twice in cac_timeout(); reuse 2019-02-02 16:21:23 +00:00
ieee80211_dfs.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_freebsd.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
ieee80211_freebsd.h net80211: reuse TICKS_2_MSEC / MSEC_2_TICKS macros from sys/time.h 2019-01-25 01:05:18 +00:00
ieee80211_hostap.c net80211(4): hide casts for 'i_seq' field offset calculation inside 2019-02-10 23:58:56 +00:00
ieee80211_hostap.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_ht.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
ieee80211_ht.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_hwmp.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
ieee80211_input.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_input.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_ioctl.c Don't use if_maddr_rlock() in 802.11, use epoch(9) directly instead. 2019-10-10 23:55:33 +00:00
ieee80211_ioctl.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_mesh.c Don't indirect user pointers directly in two 802.11s ioctls. 2020-04-24 22:10:02 +00:00
ieee80211_mesh.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_monitor.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_monitor.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_node.c net80211: fix out-of-bounds read in ieee80211_amrr(9). 2018-12-19 03:08:10 +00:00
ieee80211_node.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_output.c [net80211] Use the unicast key when transmitting DWDS AP multicast frames. 2020-05-08 17:01:33 +00:00
ieee80211_phy.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_phy.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_power.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_power.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_proto.c net80211(4): do not setup Tx parameters for unsupported modes. 2019-02-03 04:31:50 +00:00
ieee80211_proto.h net80211(4): hide casts for 'i_seq' field offset calculation inside 2019-02-10 23:58:56 +00:00
ieee80211_radiotap.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_radiotap.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_ratectl_none.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_ratectl.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_ratectl.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_regdomain.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_regdomain.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_rssadapt.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
ieee80211_rssadapt.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_scan_sta.c net80211(4): fix rate check when 'roaming' ifconfig(8) option is set to 'auto' 2019-02-03 02:32:13 +00:00
ieee80211_scan_sw.c
ieee80211_scan_sw.h
ieee80211_scan.c net80211(4): do not setup roaming parameters for unsupported modes. 2019-02-03 01:32:02 +00:00
ieee80211_scan.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_sta.c net80211(4): hide casts for 'i_seq' field offset calculation inside 2019-02-10 23:58:56 +00:00
ieee80211_sta.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_superg.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
ieee80211_superg.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_tdma.c net80211(4): do not setup Tx parameters for unsupported modes. 2019-02-03 04:31:50 +00:00
ieee80211_tdma.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_var.h Remove 2GHz channel list copies from wireless drivers. 2019-01-26 17:00:55 +00:00
ieee80211_vht.c Fix build without IEEE80211_DEBUG. 2017-01-10 19:28:40 +00:00
ieee80211_vht.h [net80211] create a helper function to calculate the station facing VHT capabilities. 2017-01-10 05:30:15 +00:00
ieee80211_wds.c Restructure mbuf send tags to provide stronger guarantees. 2019-05-24 22:30:40 +00:00
ieee80211_wds.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211_wps.h [ifconfig] Print more WPS attributes in verbose "list scan" output 2019-01-20 00:45:44 +00:00
ieee80211_xauth.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ieee80211.c Enhance the comment ieee80211_add_channel() to avoid a 2019-06-10 14:31:18 +00:00
ieee80211.h [ifconfig] Print more WPS attributes in verbose "list scan" output 2019-01-20 00:45:44 +00:00