Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d185b8b authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

mac80211: allow sending multicast frames through virtual ports



When reworking the port access control code, I forgot multicast frames
and those are now always rejected because the destination station is
not known. This changes the code to allow through multicast frames and
also avoid the sta hash lookup (which is bound to fail) for them.

Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b2205256
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -1409,11 +1409,18 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
		goto fail;
	}

	/*
	 * There's no need to try to look up the destination
	 * if it is a multicast address (which can only happen
	 * in AP mode)
	 */
	if (!is_multicast_ether_addr(hdr.addr1)) {
		sta = sta_info_get(local, hdr.addr1);
		if (sta) {
			sta_flags = sta->flags;
			sta_info_put(sta);
		}
	}

	/* receiver is QoS enabled, use a QoS type frame */
	if (sta_flags & WLAN_STA_WME) {
@@ -1422,10 +1429,12 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
	}

	/*
	 * If port access control is enabled, drop frames to unauthorised
	 * stations unless they are EAPOL frames from the local station.
	 * If port access control is enabled, drop unicast frames to
	 * unauthorised stations unless they are EAPOL frames from the
	 * local station.
	 */
	if (unlikely(sdata->ieee802_1x_pac &&
		     !is_multicast_ether_addr(hdr.addr1) &&
		     !(sta_flags & WLAN_STA_AUTHORIZED) &&
		     !(ethertype == ETH_P_PAE &&
		       compare_ether_addr(dev->dev_addr,