Re: kern/149516: [ath] ath(4) hostap with fake MAC/BSSID results in station dropping packets when associated

2012-11-30 Thread Adrian Chadd
On 29 November 2012 22:58, Martin  wrote:

> this is not good, if alternate MACs are not supported, because you also
> need them to configure multiple access points in hostapd. Take a look
> at the end of the hostapd.conf in examples. This definitely takes away
> features.

Alternate MACs are supported, but it likely needs a little further
debugging to figure out what is working and what is broken.

> Like I said... the ath(4) driver is dropping/blocking/filtering the
> packets somewhere in the send code. The receive part and the network
> operation generally work correctly, as far as I can remember.

The driver doesn't do anything like that. It just passes frames up.
The net80211 stack would set the MAC and the hardware TXes it. The ath
driver doesn't do any kind of TX filtering by MAC address.

>> If you want to take a look at whta's in the card:
>>
>> * add ATH_DIAGAPI, AH_DEBUG, ATH_DEBUG to your kernel, recompile
>> * compile up src/tools/tools/ath/
>> * use athregs -i athX , look at the BSS and MAC registers to see what
>> address it has configured.
>>
>> I bet htose aren't "right"..
>
> I'll take a look at it soon.

Thanks, that'll be very helpful.



Adrian
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: kern/149516: [ath] ath(4) hostap with fake MAC/BSSID results in station dropping packets when associated

2012-11-29 Thread Martin
Am Thu, 29 Nov 2012 13:56:35 -0800
schrieb Adrian Chadd :

> Hi,
> 
> Yes. As I said, the whole "configure an alternate MAC" thing isn't
> very consistent and I'm sure that the whole migration to VAP
> interfaces made some of the MAC BSSID and local ethernet card address
> programming "inconsistent."

Hi,

this is not good, if alternate MACs are not supported, because you also
need them to configure multiple access points in hostapd. Take a look
at the end of the hostapd.conf in examples. This definitely takes away
features.

Like I said... the ath(4) driver is dropping/blocking/filtering the
packets somewhere in the send code. The receive part and the network
operation generally work correctly, as far as I can remember.

> If you want to take a look at whta's in the card:
> 
> * add ATH_DIAGAPI, AH_DEBUG, ATH_DEBUG to your kernel, recompile
> * compile up src/tools/tools/ath/
> * use athregs -i athX , look at the BSS and MAC registers to see what
> address it has configured.
> 
> I bet htose aren't "right"..

I'll take a look at it soon.

--
Martin
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: kern/149516: [ath] ath(4) hostap with fake MAC/BSSID results in station dropping packets when associated

2012-11-29 Thread Adrian Chadd
Hi,

Yes. As I said, the whole "configure an alternate MAC" thing isn't
very consistent and I'm sure that the whole migration to VAP
interfaces made some of the MAC BSSID and local ethernet card address
programming "inconsistent."

If you want to take a look at whta's in the card:

* add ATH_DIAGAPI, AH_DEBUG, ATH_DEBUG to your kernel, recompile
* compile up src/tools/tools/ath/
* use athregs -i athX , look at the BSS and MAC registers to see what
address it has configured.

I bet htose aren't "right"..


adrian
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: kern/149516: [ath] ath(4) hostap with fake MAC/BSSID results in station dropping packets when associated

2012-11-29 Thread Martin
Am Thu, 29 Nov 2012 13:43:04 -0800
schrieb Adrian Chadd :

> There was someone who posted on -wireless a while ago about how to
> "correctly" program different mac addresses for different VAPs. The
> whole setup path is a little un-intuitive and needs some love.
> 
> So take a look over the -wireless archives for multi-VAP and separate
> mac addresses. :-)
> 
> Aha. It's actually having the LSB set in the first octet. Not the MSB.
> 
> So 0x80 is fine. 0x90 is fine. 0x09 is not.
> 
> http://en.wikipedia.org/wiki/Multicast_address
> 
> The hardware treats that address as special, so don't ever configure a
> MAC with that multicast bit set. Or things won't work out well.
> 
> 
> 
> Adrian


When I understand you correctly, this only explains why 0x0d does not
work. It still does not explain why 0x00 and 0xd0 do not work. I also
wrote that the lowest bit needs to be "0" in my first PR (duh! it has
been too long ago!). [1]

As I said, everything was OK on FreeBSD 7.x and broke somewhere in
8.1-RELEASE. Please also notice that the problem affects ath(4) on the
driver layer (I suppose) not generally on IEEE 802.11 layer, because I
also tested with rum(4) and I could use it properly.

[1]
http://lists.freebsd.org/pipermail/freebsd-stable/2010-July/058059.html

--
Martin
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: kern/149516: [ath] ath(4) hostap with fake MAC/BSSID results in station dropping packets when associated

2012-11-29 Thread Adrian Chadd
There was someone who posted on -wireless a while ago about how to
"correctly" program different mac addresses for different VAPs. The
whole setup path is a little un-intuitive and needs some love.

So take a look over the -wireless archives for multi-VAP and separate
mac addresses. :-)

Aha. It's actually having the LSB set in the first octet. Not the MSB.

So 0x80 is fine. 0x90 is fine. 0x09 is not.

http://en.wikipedia.org/wiki/Multicast_address

The hardware treats that address as special, so don't ever configure a
MAC with that multicast bit set. Or things won't work out well.



Adrian
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: kern/149516: [ath] ath(4) hostap with fake MAC/BSSID results in station dropping packets when associated

2012-11-29 Thread Martin
Am Thu, 29 Nov 2012 12:53:40 -0800
schrieb Adrian Chadd :

> You ca'nt set the high bit in the first (left hand) octet, that means
> something special.
> 
> Set it to 0x0d and re-test.
> 
> 
> 
> Adrian

Hmm... now this is weird...

When I set the first octet to 0x0d, the hostapd does not even appear in
the available networks.

I also tried to set it to 0x00 and it appeared again, but I could not
associate, either.

It works only when BSSID = MAC.

--
Martin
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: kern/149516: [ath] ath(4) hostap with fake MAC/BSSID results in station dropping packets when associated

2012-11-29 Thread Adrian Chadd
You ca'nt set the high bit in the first (left hand) octet, that means
something special.

Set it to 0x0d and re-test.



Adrian


On 29 November 2012 12:45, Martin  wrote:
> Am Thu, 29 Nov 2012 12:23:44 -0800
> schrieb Adrian Chadd :
>
>> >  Confirmed on 9.0-RELEASE-p3. Bug still exists.
>>
>> What's the fake mac address that you're using?
>>
>> Some extra code went into the driver which allowed for multicast group
>> keys to be programmed in correctly on later chips. They needed this to
>> be done "right" in order to support muli-vap mode with encryption.
>> This was done incorrectly in 8.x and I fixed it sometime before
>> 9.0-REL was branched. -HEAD definitely has the "right" programming.
>>
>> So, what's the fake MAC address?
>
> Hi,
>
> I am using this address:
>
> d0:0f:d0:0f:d0:0f (german for "stupid-stupid-stupid) ;)
>
> When I setup it on wlan0 and ath0, the stations can associate, but
> cannot communicate with hostapd.
>
> --
> Martin
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: kern/149516: [ath] ath(4) hostap with fake MAC/BSSID results in station dropping packets when associated

2012-11-29 Thread Martin
Am Thu, 29 Nov 2012 12:23:44 -0800
schrieb Adrian Chadd :

> >  Confirmed on 9.0-RELEASE-p3. Bug still exists.
> 
> What's the fake mac address that you're using?
> 
> Some extra code went into the driver which allowed for multicast group
> keys to be programmed in correctly on later chips. They needed this to
> be done "right" in order to support muli-vap mode with encryption.
> This was done incorrectly in 8.x and I fixed it sometime before
> 9.0-REL was branched. -HEAD definitely has the "right" programming.
> 
> So, what's the fake MAC address?

Hi,

I am using this address:

d0:0f:d0:0f:d0:0f (german for "stupid-stupid-stupid) ;)

When I setup it on wlan0 and ath0, the stations can associate, but
cannot communicate with hostapd.

--
Martin
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: kern/149516: [ath] ath(4) hostap with fake MAC/BSSID results in station dropping packets when associated

2012-11-29 Thread Adrian Chadd
Hi,

On 29 November 2012 11:40, Martin  wrote:
> The following reply was made to PR kern/149516; it has been noted by GNATS.
>
> From: Martin 
> To: bug-follo...@freebsd.org
> Cc:
> Subject: Re: kern/149516: [ath] ath(4) hostap with fake MAC/BSSID results in
>  station dropping packets when associated
> Date: Thu, 29 Nov 2012 20:35:05 +0100
>
>  Confirmed on 9.0-RELEASE-p3. Bug still exists.

What's the fake mac address that you're using?

Some extra code went into the driver which allowed for multicast group
keys to be programmed in correctly on later chips. They needed this to
be done "right" in order to support muli-vap mode with encryption.
This was done incorrectly in 8.x and I fixed it sometime before
9.0-REL was branched. -HEAD definitely has the "right" programming.

So, what's the fake MAC address?

Thanks,



Adrian
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: kern/149516: [ath] ath(4) hostap with fake MAC/BSSID results in station dropping packets when associated

2012-11-29 Thread Martin
The following reply was made to PR kern/149516; it has been noted by GNATS.

From: Martin 
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: kern/149516: [ath] ath(4) hostap with fake MAC/BSSID results in
 station dropping packets when associated
Date: Thu, 29 Nov 2012 20:35:05 +0100

 Confirmed on 9.0-RELEASE-p3. Bug still exists.
 
 --
 Martin
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"