Re: Regression: ethernet + wireless/ath under lagg

2016-10-12 Thread Adrian Chadd
On 12 October 2016 at 12:32, J.R. Oldroyd  wrote:
> On Wed, 12 Oct 2016 09:08:20 -0700 Adrian Chadd  
> wrote:
>>
>> hiya,
>>
>> there should be a way to create a vap with a specific mac address upon
>> creation time. Sorry, doing lagg+wlan is not something we've been
>> collectively using. :(
>>
>> Thanks,
>>
>>
>> -adrian
>>
>>
>
> PR#213207 appears to be discussing this same problem.
>
> I am truly amazed that this "is not something we've been collectively
> using"!  Here, we have all of Macs, Windows, Linux for which this
> "just works" and it also worked fine (with the config I posted
> earlier) on 9.x and 10.x.  Your bog-standard, cheapo Linksys/Netgear/
> whatever, bridge their wireless network to their wired ports, and it
> is common practice here to be using wireless and then to later plug
> into a wired port on those routers and have connections continue
> seamlessly.

Sure, but the set of wifi developers and set of wifi users is as big
as the smallest set, and the set of wifi developers is like what, 3?
4?

None of us were bitten by this because I don't think any of the wifi
developers (me included) use lagg and failover.

> A way of determining the ath's MAC address so it can be used to set
> the re's MAC, or a way of setting the ath's MAC address prior to wlan
> creation is needed in 11.x.

Andriy has proposed one way, which I like. We'd just have to do that
method for all wifi drivers, as well as making sure drivers can fail
the VAP creation if a MAC is again requested and the device doesn't
support it.



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


[Bug 213207] ath: Unable to set device MAC in FreeBSD 11

2016-10-12 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213207

Adrian Chadd  changed:

   What|Removed |Added

 CC||adr...@freebsd.org

--- Comment #11 from Adrian Chadd  ---
So, the challenge is thus.

The device has a MAC address. There's a BSSID and a macaddress field. then,
when creating say, cloned AP vaps, the isn't a list of MACs that the NIC has -
the reason they're typically only a small difference is there's a BSSID /mask/
field for matching against. look at if_ath.c:assign_address() - and that only
happens for hostap and mbss modes.

Now, before glebius removed the device entries from ifconfig, changing the
parent device MAC would change what's effectively now ic->ic_macaddr.  When you
create a new VAP, it clones ic->ic_macaddr unless you provide
IEEE80211_CLONE_MACADDR as an argument and a separate MAC address. In that
instance, the VAP is created with a completely different MAC address. Now that
there's no parent ifnet, there's no easy (ie, same for all devices) way of
modifying ic_macaddr and having that programmed into the hardware for
subsequent device updates.

So here's what's going on:

* the device will read its MAC from EEPROM, etc, and feed it into ic_macaddr
* when creating VAPs, net80211 will use ic_macaddr unless given
IEEE80211_CLONE_MACADDR as an argument - at which point it'll use a completely
separate MAC address for that argument.
* trouble is, that won't really help with STA mode (at least on ath(4)) as
there is only one MAC address, and that is what's prgorammed in via
ath_hal_setmac()
* when cloning AP VAPs, if_ath.c:assign_address() will update the chipset BSSID
mask, so multiple sequential MACs are accepted as "local"
* .. but that doesn't do anything useful for STA mode, so setting the VAP MAC
address to anything that isn't ic_macaddr won't affect anything useful.

Ok, so what we really need is:

* fix up the hint.ath.X.macaddr thing to work right if it doesn't
* figure out a generic way to fetch a wifi device mac address, now that
'ifconfig' can't do it;
* figure out a generic way to re-program the device MAC address when the first
VAP is created if it has changed, so the first VAP creation can be given an
ethernet address and it will actually program the device; or
* .. document one way (eg andriy's way, where setting the wlanaddr on the first
VAP will program the NIC MAC, and any subsequent creations can only vary
depending upon what the hardware will provide) - and then audit /all/ drivers
to make sure that method works.

I think andriy's way is fine, and we just need to document it in the
manpage/docbook and then audit every wifi driver. But I'd still like some
generic way to fetch ic_macaddr from a device - eg by sysctl, or if we can do
it via an existing device ioctl, that.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


[Bug 213207] ath: Unable to set device MAC in FreeBSD 11

2016-10-12 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213207

--- Comment #10 from f...@opal.com ---
Oh, to follow-up on what I said in that thread, we need either a way to
determine the ath's MAC address, e.g., a sysctl dev.ath.N.macaddr or similar,
so that we can use this to set the ethernet's MAC, or we need a way to set the
ath's MAC address prior to wlan creation.  Or both!

As Adrian Chadd replied, "there should be a way to create a vap with a specific
mac address upon creation time".

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


[Bug 213207] ath: Unable to set device MAC in FreeBSD 11

2016-10-12 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213207

--- Comment #9 from f...@opal.com ---
This affects us here, too.

In an email thread on freebsd-wireless, "Regression: ethernet + wireless/ath
under lagg", I posted an alternative work-around, but both the solution here
and that one require hard-coded MAC addresses in config files, which isn't a
good solution.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: Regression: ethernet + wireless/ath under lagg

2016-10-12 Thread J.R. Oldroyd
On Wed, 12 Oct 2016 09:08:20 -0700 Adrian Chadd  wrote:
>
> hiya,
> 
> there should be a way to create a vap with a specific mac address upon
> creation time. Sorry, doing lagg+wlan is not something we've been
> collectively using. :(
> 
> Thanks,
> 
> 
> -adrian
> 
> 

PR#213207 appears to be discussing this same problem.

I am truly amazed that this "is not something we've been collectively
using"!  Here, we have all of Macs, Windows, Linux for which this
"just works" and it also worked fine (with the config I posted
earlier) on 9.x and 10.x.  Your bog-standard, cheapo Linksys/Netgear/
whatever, bridge their wireless network to their wired ports, and it
is common practice here to be using wireless and then to later plug
into a wired port on those routers and have connections continue
seamlessly.

A way of determining the ath's MAC address so it can be used to set
the re's MAC, or a way of setting the ath's MAC address prior to wlan
creation is needed in 11.x.

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


[Bug 213207] ath: Unable to set device MAC in FreeBSD 11

2016-10-12 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213207

--- Comment #8 from Andriy Voskoboinyk  ---
Created attachment 175673
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=175673=edit
wlanaddr fix

Can you try the patch? It may fix MAC address change via 'wlanaddr' (but not
via 'ether').

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: Regression: ethernet + wireless/ath under lagg

2016-10-12 Thread Adrian Chadd
hiya,

there should be a way to create a vap with a specific mac address upon
creation time. Sorry, doing lagg+wlan is not something we've been
collectively using. :(

Thanks,


-adrian


On 12 October 2016 at 08:17, J.R. Oldroyd  wrote:
> Since something like 9.0-release, I have used the following to config
> an re and an ath interface together in a lagg.  The intent is to have
> both ethernet and wireless interfaces share the lagg and be seamlessly
> pluggable between the two networks.  It was necessary to set the ath's
> MAC address to be the same as the re's, else the wlan created from the
> ath would not associate.  (The wlan's MAC address must be the same as
> the underlying device's MAC, else the wlan fails WPA authentication.
> Changing the underlying device's MAC before the wlan is created works
> OK.)  This config has worked just fine on both 9.x and 10.x:
>
> In /etc/rc.conf:
>
> ifconfig_re0="up"
> ifconfig_re0_ipv6="inet6 accept_rtadv"
> ifconfig_ath0="`ifconfig re0 ether`"
> ifconfig_ath0="ether ${ifconfig_ath0##*ether }"
> wlans_ath0=wlan0
> create_args_wlan0="regdomain FCC country US"
> ifconfig_wlan0="WPA"
> ifconfig_wlan0_ipv6="inet6 accept_rtadv"
> cloned_interfaces="lagg0"
> ifconfig_lagg0="laggproto failover laggport re0 laggport wlan0 DHCP"  
>   # WAN_IF
> ifconfig_lagg0_ipv6="inet6 accept_rtadv"
>
> Now, with 11.0-release, this no longer works because the ath interface
> doesn't exist any more, so ifconfig cannot pre-change its MAC.  And, I
> have been unable to find a way of either determining or setting the
> ath's MAC address using sysctls.
>
> Now, the following does work, hard-coding the ath's MAC, and changing
> the re's address to that value, instead of the other way around:
>
> ether_ath0="70:1a:11:22:33:44"   # actual ath0 MAC address
> ifconfig_re0="ether $ether_ath0 up"
> ifconfig_re0_ipv6="inet6 accept_rtadv"
> wlans_ath0=wlan0
> create_args_wlan0="regdomain FCC country US"
> ifconfig_wlan0="WPA"
> ifconfig_wlan0_ipv6="inet6 accept_rtadv"
> cloned_interfaces="lagg0"
> ifconfig_lagg0="laggproto failover laggport re0 laggport wlan0 DHCP"  
>   # WAN_IF
> ifconfig_lagg0_ipv6="inet6 accept_rtadv"
>
> Obviously, hard-coding a MAC address isn't a good solution.
>
> Am I missing something?  Is there a way to config this without a
> hard-coded address?
>
> Or, do we need to fix the bug that is preventing setting the wlan's
> MAC address to be something different from the underlying ath's
> address?
>
> -jr
> ___
> freebsd-wireless@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Regression: ethernet + wireless/ath under lagg

2016-10-12 Thread J.R. Oldroyd
Since something like 9.0-release, I have used the following to config
an re and an ath interface together in a lagg.  The intent is to have
both ethernet and wireless interfaces share the lagg and be seamlessly 
pluggable between the two networks.  It was necessary to set the ath's
MAC address to be the same as the re's, else the wlan created from the
ath would not associate.  (The wlan's MAC address must be the same as
the underlying device's MAC, else the wlan fails WPA authentication.
Changing the underlying device's MAC before the wlan is created works
OK.)  This config has worked just fine on both 9.x and 10.x:

In /etc/rc.conf:

ifconfig_re0="up"
ifconfig_re0_ipv6="inet6 accept_rtadv"
ifconfig_ath0="`ifconfig re0 ether`"
ifconfig_ath0="ether ${ifconfig_ath0##*ether }"
wlans_ath0=wlan0
create_args_wlan0="regdomain FCC country US"
ifconfig_wlan0="WPA"
ifconfig_wlan0_ipv6="inet6 accept_rtadv"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport re0 laggport wlan0 DHCP"
# WAN_IF
ifconfig_lagg0_ipv6="inet6 accept_rtadv"

Now, with 11.0-release, this no longer works because the ath interface
doesn't exist any more, so ifconfig cannot pre-change its MAC.  And, I
have been unable to find a way of either determining or setting the
ath's MAC address using sysctls.

Now, the following does work, hard-coding the ath's MAC, and changing
the re's address to that value, instead of the other way around:

ether_ath0="70:1a:11:22:33:44"   # actual ath0 MAC address
ifconfig_re0="ether $ether_ath0 up"
ifconfig_re0_ipv6="inet6 accept_rtadv"
wlans_ath0=wlan0
create_args_wlan0="regdomain FCC country US"
ifconfig_wlan0="WPA"
ifconfig_wlan0_ipv6="inet6 accept_rtadv"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport re0 laggport wlan0 DHCP"
# WAN_IF
ifconfig_lagg0_ipv6="inet6 accept_rtadv"

Obviously, hard-coding a MAC address isn't a good solution.

Am I missing something?  Is there a way to config this without a
hard-coded address?

Or, do we need to fix the bug that is preventing setting the wlan's
MAC address to be something different from the underlying ath's
address? 

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