mac80211: multicast to unicast conversion
Add the ability for an AP (and associated VLANs) to perform multicast-to-unicast conversion for ARP, IPv4 and IPv6 frames (possibly within 802.1Q). If enabled, such frames are to be sent to each station separately, with the DA replaced by their own MAC address rather than the group address. Note that this may break certain expectations of the receiver, such as the ability to drop unicast IP packets received within multicast L2 frames, or the ability to not send ICMP destination unreachable messages for packets received in L2 multicast (which is required, but the receiver can't tell the difference if this new option is enabled.) This also doesn't implement the 802.11 DMS (directed multicast service). Signed-off-by: Michael Braun <michael-dev@fami-braun.de> [use true/false, rename label to the correct "multicast", use __be16 for ethertype and network order for constants] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
此提交包含在:
@@ -3563,6 +3563,17 @@ void ieee80211_nan_func_match(struct ieee80211_vif *vif,
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_nan_func_match);
|
||||
|
||||
static int ieee80211_set_multicast_to_unicast(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
const bool enabled)
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||
|
||||
sdata->u.ap.multicast_to_unicast = enabled;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const struct cfg80211_ops mac80211_config_ops = {
|
||||
.add_virtual_intf = ieee80211_add_iface,
|
||||
.del_virtual_intf = ieee80211_del_iface,
|
||||
@@ -3653,4 +3664,5 @@ const struct cfg80211_ops mac80211_config_ops = {
|
||||
.nan_change_conf = ieee80211_nan_change_conf,
|
||||
.add_nan_func = ieee80211_add_nan_func,
|
||||
.del_nan_func = ieee80211_del_nan_func,
|
||||
.set_multicast_to_unicast = ieee80211_set_multicast_to_unicast,
|
||||
};
|
||||
|
新增問題並參考
封鎖使用者