6 cfg
="$(find_config "$1")"
7 [ -z "$cfg" ] && return 0
8 config_get iftype
"$cfg" type
9 [ "$iftype" = bridge
] && config_get
"$iftype" bridge
16 config_get vifs
"$device" vifs
18 config_get mode
"$vif" mode
30 ap_if
="${ap_if:+$ap_if }$vif"
32 *) echo "$device($vif): Invalid mode";;
37 for vif
in ${adhoc_if:-$sta_if $ap_if}; do
38 config_set
"$vif" ifname
"wl0${_c:+.$_c}"
43 for vif
in 0 1 2 3; do
44 append ifdown
"vif $vif" "$N"
45 append ifdown
"enabled 0" "$N"
53 case "$adhoc:$sta:$ap" in
77 config_get channel
"$device" channel
78 config_get country
"$device" country
79 config_get maxassoc
"$device" maxassoc
85 for vif
in ${adhoc_if:-$sta_if $ap_if}; do
86 append vif_pre_up
"vif $_c" "$N"
87 append vif_post_up
"vif $_c" "$N"
89 [ "$vif" = "$sta_if" ] ||
{
90 config_get_bool hidden
"$vif" hidden
1
91 append vif_pre_up
"closed $hidden" "$N"
92 config_get_bool isolate
"$vif" isolate
93 append vif_pre_up
"ap_isolate $hidden" "$N"
101 config_get enc
"$vif" encryption
108 config_get key
"$vif" key
110 wpa2
*|WPA2
*|PSK2
*|psk2
*) auth
=128; wsec
=4;;
111 *) auth
=4; crypto
=2;;
113 eval "${vif}_key=\"\$key\""
114 nasopts
="-k \"\$${vif}_key\""
119 config_get key
"$vif" key
120 config_get server
"$vif" server
121 config_get port
"$vif" port
123 wpa2
*|WPA2
*) auth
=64; wsec
=4;;
124 *) auth
=2; crypto
=2;;
126 eval "${vif}_key=\"\$key\""
127 nasopts
="-r \"\$${vif}_key\" -h $server -p $port"
130 append vif_post_up
"wsec $wsec" "$N"
131 append vif_post_up
"wpa_auth $auth" "$N"
132 append vif_post_up
"wsec_restrict $wsec_r" "$N"
133 append vif_post_up
"eap_restrict $eap_r" "$N"
135 config_get ssid
"$vif" ssid
136 append vif_post_up
"vlan_mode 0"
137 append vif_post_up
"ssid $ssid" "$N"
138 append vif_post_up
"enabled 1" "$N"
140 config_get ifname
"$vif" ifname
141 append if_up
"ifconfig $ifname up" ";$N"
142 [ -z "$nasopts" ] ||
{
143 bridge
="$(bridge_interface "$ifname")"
144 eval "${vif}_ssid=\"\$ssid\""
146 [ "$vif" = "$sta_if" ] && mode
="-S"
147 [ -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 &"
151 killall
-KILL nas
>&- 2>&-
165 channel ${channel:-0}
166 country ${country:-IL0}
167 maxassoc ${maxassoc:-128}
This page took 0.065707 seconds and 5 git commands to generate.