6cac60c0b76ed0f34ccb00662c62daf7f4194fce
4 config_get vifs
"$device" vifs
6 config_get mode
"$vif" mode
18 ap_if
="${ap_if:+$ap_if }$vif"
20 *) echo "$device($vif): Invalid mode";;
25 for vif
in ${adhoc_if:-$sta_if $ap_if}; do
26 config_set
"$vif" ifname
"wl0${_c:+.$_c}"
31 for vif
in 0 1 2 3; do
32 append ifdown
"vif $vif" "$N"
33 append ifdown
"enabled 0" "$N"
41 case "$adhoc:$sta:$ap" in
65 config_get channel
"$device" channel
66 config_get country
"$device" country
67 config_get maxassoc
"$device" maxassoc
73 for vif
in ${adhoc_if:-$sta_if $ap_if}; do
74 append vif_pre_up
"vif $_c" "$N"
75 append vif_post_up
"vif $_c" "$N"
77 [ "$vif" = "$sta_if" ] ||
{
78 config_get_bool hidden
"$vif" hidden
1
79 append vif_pre_up
"closed $hidden" "$N"
80 config_get_bool isolate
"$vif" isolate
81 append vif_pre_up
"ap_isolate $hidden" "$N"
89 config_get enc
"$vif" encryption
96 config_get key
"$vif" key
98 wpa2
*|WPA2
*|PSK2
*|psk2
*) auth
=128; wsec
=4;;
101 eval "${vif}_key=\"\$key\""
102 nasopts
="-k \"\$${vif}_key\""
107 config_get key
"$vif" key
108 config_get server
"$vif" server
109 config_get port
"$vif" port
111 wpa2
*|WPA2
*) auth
=64; wsec
=4;;
112 *) auth
=2; crypto
=2;;
114 eval "${vif}_key=\"\$key\""
115 nasopts
="-r \"\$${vif}_key\" -h $server -p $port"
118 append vif_post_up
"wsec $wsec" "$N"
119 append vif_post_up
"wpa_auth $auth" "$N"
120 append vif_post_up
"wsec_restrict $wsec_r" "$N"
121 append vif_post_up
"eap_restrict $eap_r" "$N"
123 config_get ssid
"$vif" ssid
124 append vif_post_up
"ssid $ssid" "$N"
125 append vif_post_up
"enabled 1" "$N"
127 config_get ifname
"$vif" ifname
128 append if_up
"ifconfig $ifname up" ";$N"
129 [ -z "$nasopts" ] ||
{
130 config_get bridge
"$vif" bridge
# XXX: integrate with /etc/config/network later
131 eval "${vif}_ssid=\"\$ssid\""
133 [ "$vif" = "$sta_if" ] && mode
="-S"
134 [ -z "$nas" ] || nas_cmd
="${nas_cmd:+$nas_cmd$N}$nas -P /var/run/nas.$ifname.pid -H 34954 ${bridge:+ -l $bridge} -i $ifname $mode -m $auth -w $crypto -s \"\$${vif}_ssid\" -g 3600 $nasopts &"
138 killall
-KILL nas
>&- 2>&-
152 channel ${channel:-0}
153 country ${country:-IL0}
154 maxassoc ${maxassoc:-128}
This page took 0.069684 seconds and 3 git commands to generate.