I want to create an Wireless Interface with a Spezial MAC ans same bssid ind hostapmode: If I do /sbin/ifconfig wlan0 create wlandev urtwn0 wlanaddr 00:24:b2:0e:15:cd -bssid wlanmode hostap ssid "NZ@McD1" authmode open country DE descr nintendo /sbin/ifconfig wlan0 up I get the following: /sbin/ifconfig wlan0 wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 description: nintendo ether 00:24:b2:0e:15:cd groups: wlan ssid NZ@McD1 channel 9 (2452 MHz 11g) bssid 00:24:b2:0e:15:cd regdomain ETSI country DE authmode OPEN privacy OFF txpower 30 scanvalid 60 protmode CTS wme dtimperiod 1 -dfs media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap> status: running nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> Works as expected. But if i rename the Interface after cretaion: /sbin/ifconfig wlan0 create wlandev urtwn0 wlanaddr 00:24:b2:0e:15:cd -bssid wlanmode hostap ssid "NZ@McD1" authmode open country DE descr nintendo /sbin/ifconfig wlan0 nintendo /sbin/ifconfig nintendo up I get the following: /sbin/ifconfig nintendo nintendo: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 description: nintendo ether 00:24:b2:0e:15:cd groups: wlan ssid NZ@McD1 channel 9 (2452 MHz 11g) bssid 6e:64:6f:00:24:b2 regdomain ETSI country DE authmode OPEN privacy OFF txpower 30 scanvalid 60 protmode CTS wme dtimperiod 1 -dfs media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap> status: running nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> as you can see bssid ist not the expected one. tested wither urtwn0 and run0
> /sbin/ifconfig wlan0 nintendo ifconfig: nintendo: bad value (probably, you mean '/sbin/ifconfig wlan0 name nintendo) > 6e:64:6f:00:24:b2 6e:64:6f is 'ndo' (part of the name), 00:24:b2 is an address part (memory corruption?)
... and this name is longer for only three (ndo) chars than the previous one.
(In reply to Andriy Voskoboinyk from comment #1) Yes of cource.
A commit references this bug: Author: avos Date: Tue Apr 5 21:29:11 UTC 2016 New revision: 297592 URL: https://svnweb.freebsd.org/changeset/base/297592 Log: net80211: copy MAC address into iv_myaddr[] instead of aliasing it. Since IF_LLADDR() returns a non-constant pointer to the MAC address preserve a copy of it in iv_myaddr. PR: 208505 Changes: head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_var.h
Should be fixed now.