wlan0 + hostap + rc.conf

Alberto Mijares amijaresp at gmail.com
Tue Mar 16 21:21:19 UTC 2010


Hi Hackers,

>From man rc.conf:

If a wlans_⟨interface⟩ variable is set, an wlan(4) interface will be
created for each item in the list with the wlandev argument set to
interface.  Further wlan cloning arguments may be passed to the
ifconfig(8) create command by setting the create_args_⟨interface⟩
variable.  One or more wlan(4) devices must be created for each
wireless devices as of FreeBSD 8.0.

So, this is my rc.conf

ifconfig_sis0="up"
wlans_ath0="wlan0"
create_args_wlan0="wlanmode ap"
ifconfig_wlan0="ssid nombre channel X mode 11g up"
cloned_interfaces="bridge0"
ifconfig_bridge0="addm wlan0 addm sis0 inet A.B.C.D netmask W.X.Y.Z up"

However, when I run /etc/rc.d/netif restart, an error says:

ifconfig: create: bad value

the create command fails and everything related to the AP initialization.

When I run the command in the CLI it works fine

# ifconfig wlan0 create wlandev ath0 wlanmode ap

What could be wrong?

Thanks in advance.


Alberto Mijares


More information about the freebsd-questions mailing list