Updated patch after quick discussion with jow
--- a/hostapd.sh 2011-07-25 14:05:21.000000000 +0300
+++ b/hostapd.sh 2011-07-25 15:35:53.000000000 +0300
@@ -2,6 +2,7 @@
local var="$1"
local vif="$2"
local enc wpa_group_rekey wps_possible
+ local vlan_enable vlan_file vlan_interface
config_get enc "$vif" encryption
config_get wpa_group_rekey "$vif" wpa_group_rekey
@@ -93,6 +94,16 @@
append "$var" "wpa_key_mgmt=WPA-EAP" "$N"
append "$var" "wpa_group_rekey=300" "$N"
append "$var" "wpa_gmk_rekey=640" "$N"
+ config_get vlan_enable "$vif" vlan_enable 0
+ case "$vlan_enable" in
+ 1|2)
+ append "$var"
"dynamic_vlan=$vlan_enable" "$N"
+ config_get vlan_file "$vif" vlan_file
/etc/hostapd.vlan
+ append "$var" "vlan_file=$vlan_file"
"$N"
+ config_get vlan_interface "$vif"
vlan_interface eth0
+ append "$var"
"vlan_tagged_interface=$vlan_interface" "$N"
+ ;;
+ esac
;;
*wep*)
config_get key "$vif" key
On Jul 25, 2011, at 2:44 PM, Matthew Bowman wrote:
> This patch adds the necessary configuration options for activating dynamic
> vlans in hostapd
>
> Signed-off-by: Matthew Bowman <mgbowman_at_gmx_punct_com>
>
> --- a/hostapd.sh 2011-07-25 14:05:21.000000000 +0300
> +++ b/hostapd.sh 2011-07-25 14:07:22.000000000 +0300
> @@ -93,6 +93,15 @@
> append "$var" "wpa_key_mgmt=WPA-EAP" "$N"
> append "$var" "wpa_group_rekey=300" "$N"
> append "$var" "wpa_gmk_rekey=640" "$N"
> + config_get dynamic_vlan "$vif" dynamic_vlan
> + [ -n "$dynamic_vlan" ] && {
> + append "$var" "dynamic_vlan=$dynamic_vlan"
> "$N"
> + config_get vlan_file "$vif" vlan_file
> +
> vlan_file=${vlan_file:-/etc/config/hostapd.vlan}
> + append "$var" "vlan_file=$vlan_file" "$N"
> + config_get vlan_tagged_interface "$vif"
> vlan_tagged_interface
> + [ -n "$vlan_tagged_interface" ] && append
> "$var" "vlan_tagged_interface=$vlan_tagged_interface" "$N"
> + }
> ;;
> *wep*)
> config_get key "$vif" key
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel