33a3ebb8fa9547922c6fb8510d49ce8eaac812bf
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
72 for vif
in ${adhoc_if:-$sta_if $ap_if}; do
73 append vif_pre_up
"vif $_c" "$N"
74 append vif_post_up
"vif $_c" "$N"
76 [ "$vif" = "$sta_if" ] ||
{
77 config_get_bool hidden
"$vif" hidden
1
78 append vif_pre_up
"closed $hidden" "$N"
79 config_get_bool isolate
"$vif" isolate
80 append vif_pre_up
"ap_isolate $hidden" "$N"
88 config_get enc
"$vif" encryption
95 config_get key
"$vif" key
97 wpa2
*|WPA2
*|PSK2
*|psk2
*) auth
=128; wsec
=4;;
100 eval "${vif}_key=\"\$key\""
101 nasopts
="-k \"\$${vif}_key\""
106 config_get key
"$vif" key
107 config_get server
"$vif" server
108 config_get port
"$vif" port
110 wpa2
*|WPA2
*) auth
=64; wsec
=4;;
111 *) auth
=2; crypto
=2;;
113 eval "${vif}_key=\"\$key\""
114 nasopts
="-r \"\$${vif}_key\" -h $server -p $port"
117 append vif_post_up
"wsec $wsec" "$N"
118 append vif_post_up
"wpa_auth $auth" "$N"
119 append vif_post_up
"wsec_restrict $wsec_r" "$N"
120 append vif_post_up
"eap_restrict $eap_r" "$N"
122 config_get ssid
"$vif" ssid
123 append vif_post_up
"ssid $ssid" "$N"
124 append vif_post_up
"enabled 1" "$N"
126 [ -z "$nasopts" ] ||
{
127 config_get ifname
"$vif" ifname
128 config_get bridge
"$vif" bridge
# XXX: integrate with /etc/config/network later
129 eval "${vif}_ssid=\"\$ssid\""
131 [ "$vif" = "$sta_if" ] && mode
="-S"
132 [ -z "$nas" ] || nas_cmd
="${nas_cmd:+$nas_cmd$N}$nas -P /var/run/nas.$ifname.pid -H 34954 -i $ifname${bridge:+ -l $bridge} $mode -m $auth -w $crypto -s \"\$${vif}_ssid\" -g 3600 $nasopts &"
136 killall
-KILL nas
>&- 2>&-
150 channel ${channel:-0}
151 country ${country:-IL0}
152 maxassoc ${maxassoc:-128}
This page took 0.052043 seconds and 3 git commands to generate.