Return-path: Received: from mail-qt0-f173.google.com ([209.85.216.173]:34298 "EHLO mail-qt0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752063AbeCMJSO (ORCPT ); Tue, 13 Mar 2018 05:18:14 -0400 Received: by mail-qt0-f173.google.com with SMTP id l25so21932739qtj.1 for ; Tue, 13 Mar 2018 02:18:14 -0700 (PDT) Subject: Re: Problem with bridge (mcast-to-ucast + hairpin) and Broadcom's 802.11f in their FullMAC fw To: Felix Fietkau , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , =?UTF-8?Q?Linus_L=c3=bcssing?= , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Pieter-Paul Giesberts References: Cc: Network Development , bridge@lists.linux-foundation.org, linux-wireless@vger.kernel.org, "open list:BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER" , brcm80211-dev-list@cypress.com From: Arend van Spriel Message-ID: <5AA79752.8070200@broadcom.com> (sfid-20180313_101822_507879_CB2050A3) Date: Tue, 13 Mar 2018 10:18:10 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: On 3/13/2018 8:20 AM, Felix Fietkau wrote: > [resent with fixed typo in linux-wireless address] > > On 2018-02-27 11:08, Rafał Miłecki wrote: >> I've problem when using OpenWrt/LEDE on a home router with Broadcom's >> FullMAC WiFi chipset. >> >> >> First of all OpenWrt/LEDE uses bridge interface for LAN network with: >> 1) IFLA_BRPORT_MCAST_TO_UCAST >> 2) Clients isolation in hostapd >> 3) Hairpin mode enabled >> >> For more details please see Linus's patch description: >> https://patchwork.kernel.org/patch/9530669/ >> and maybe hairpin mode patch: >> https://lwn.net/Articles/347344/ >> >> Short version: in that setup packets received from a bridged wireless >> interface can be handled back to it for transmission. >> >> >> Now, Broadcom's firmware for their FullMAC chipsets in AP mode >> supports an obsoleted 802.11f AKA IAPP standard. It's a roaming >> standard that was replaced by 802.11r. >> >> Whenever a new station associates, firmware generates a packet like: >> ff ff ff ff ff ff ec 10 7b 5f ?? ?? 00 06 00 01 af 81 01 00 >> (just masked 2 bytes of my MAC) >> >> For mode details you can see discussion in my brcmfmac patch thread: >> https://patchwork.kernel.org/patch/10191451/ >> >> >> The problem is that bridge (in setup as above) handles such a packet >> back to the device. >> >> That makes Broadcom's FullMAC firmware believe that a given station >> just connected to another AP in a network (which doesn't even exist). >> As a result firmware immediately disassociates that station. It's >> simply impossible to connect to the router. Every association is >> followed by immediate disassociation. >> >> >> Can you see any solution for this problem? Is that an option to stop >> multicast-to-unicast from touching 802.11f packets? Some other ideas? >> Obviously I can't modify Broadcom's firmware and drop that obsoleted >> standard. > Let's look at it from a different angle: Since these packets are > forwarded as normal packets by the bridge, and the Broadcom firmware > reacts to them in this nasty way, that's basically local DoS security > issue. In my opinion that matters a lot more than having support for an > obsolete feature that almost nobody will ever want to use. > > I think the right approach to deal with this issue is to drop these > garbage packets in both the receive and transmit path of brcmfmac. My approach was to get rid of it in firmware as this never made it into the 802.11 spec. So I asked internally whether it was still used. Turns out that we still rely on it for some customers. I am fine with dropping these "garbage" packets, but given that there is still use for it I would like to see that under a Kconfig flag. Dropping it may be the default. Regards, Arend