From owner-freebsd-wireless@FreeBSD.ORG Mon Oct 21 05:05:50 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 74348519 for ; Mon, 21 Oct 2013 05:05:50 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-x22d.google.com (mail-qe0-x22d.google.com [IPv6:2607:f8b0:400d:c02::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 37B4D29D8 for ; Mon, 21 Oct 2013 05:05:50 +0000 (UTC) Received: by mail-qe0-f45.google.com with SMTP id 8so3482105qea.32 for ; Sun, 20 Oct 2013 22:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=nQMFU1oM/2gnzy2McN7zu25Uu9osDsnm+rtkC8dNwNk=; b=Ctu9PwJKGlig4H01Z7QDdfzr/BXWp5qAANB1pwXa7VWiY//f1nCuS42ZtN6IAn8Gb0 0rqpOdT5VbDEcL0n8RU7jeVg3M/oNppLKXhiPoybe6XcF4iogdSF1I05BP8T5Qqj6j54 BtrHeU4RnsulcFfHqMwnHpQcHxpD8axkTasihG4dksgiVIJVFwYpcmbnVsFDaD7z9rJ9 Fga5gHEzSgVY6ffLuL5q8u/Iadaop/BgQJCrm7h2U4szduupA3KU4hK13TltQoBrK9k7 qfQiY//OSTd+qAZv2dlI+QUpnw3KIbgMU6y5/VNEfptgkacr0RgxrnxcVWunBZIh4wqP TEJA== MIME-Version: 1.0 X-Received: by 10.49.130.132 with SMTP id oe4mr6795qeb.86.1382331949436; Sun, 20 Oct 2013 22:05:49 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Sun, 20 Oct 2013 22:05:49 -0700 (PDT) Date: Sun, 20 Oct 2013 22:05:49 -0700 X-Google-Sender-Auth: 2YycKfdca3BOtL75YaxEbnMS81w Message-ID: Subject: implementing multiple BSSID addresses for different VAPs, or 'why was the flag called bssid again?' From: Adrian Chadd To: "freebsd-wireless@freebsd.org" , =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2013 05:05:50 -0000 So, I finally (!) figured out how this address cloning crap works. In if_ath.c, there's assign_address(). It, yes, assigns addresses. If the hardware supports the bssid mask field and the clone flag is set, it sets up multiple addresses. This works great for up to 4 MACs. We have to modify it to support more than 4 MAC addresses per NIC. .. but, how do you set the clone flag? The ifconfig manpage has two entries for 'bssid'. * the first is when you 'create' a VAP. It's passed as an arguement during create, but before wlanmode. It doesn't take an option. * the second is for setting the BSS ID for the VAP. It _does_ take an option (the MAC.) If you try this, it fails: * ifconfig wlan11 create wlandev ath0 wlanmode hostap ssid 'foo_2' bssid If you try this, it works: * ifconfig wlan11 create wlandev ath0 bssid wlanomde hostap ssid 'foo_2' So, if you run multi-VAP, and you want to use WPA on all of the VAPs, please try using 'bssid' as above and ensure you get multiple MAC addresses. This should make things behave much, much better. If it doesn't then we have bigger problems. Thanks, -adrian