Sorry about the incorrect patches. This is a combined patch of the "supporting"
files.
--- a/package/hostapd/files/hostapd.sh 2011-07-25 14:05:21.000000000 +0300
+++ b/package/hostapd/files/hostapd.sh 2011-07-25 16:44:00.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
--- a/package/hostapd/files/hostapd.vlan 1970-01-01 02:00:00.000000000
+0200
+++ b/package/hostapd/files/hostapd.vlan 2011-07-25 16:41:36.000000000
+0300
@@ -0,0 +1,4 @@
+# Wildcard entry matching all VLAN IDs. The first # in the interface
+# name will be replaced with the VLAN ID. The network interfaces are
+# created (and removed) dynamically based on the use.
+* wlan0.#
--- a/package/hostapd/Makefile 2011-07-25 15:43:33.000000000 +0300
+++ b/package/hostapd/Makefile 2011-07-25 15:58:49.000000000 +0300
@@ -281,6 +281,8 @@
define Install/hostapd
$(INSTALL_DIR) $(1)/lib/wifi
$(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/wifi/hostapd.sh
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_DATA) ./files/hostapd.vlan $(1)/etc/hostapd.vlan
$(INSTALL_DIR) $(1)/usr/sbin
endef
On Jul 25, 2011, at 4:35 PM, Matthew Bowman wrote:
> Per a discussion with jow, here's a default hostapd.vlan file and a patched
> Makefile to install the file to /etc
>
> Signed-off-by: Matthew Bowman <mgbowman at gmx punct com>
>
> package/hostapd/files/hostapd.vlan
>
> # Wildcard entry matching all VLAN IDs. The first # in the interface
> # name will be replaced with the VLAN ID. The network interfaces are
> # created (and removed) dynamically based on the use.
> * wlan0.#
>
> --- a/Makefile 2011-07-25 15:43:33.000000000 +0300
> +++ b/Makefile 2011-07-25 15:58:49.000000000 +0300
> @@ -281,6 +281,8 @@
> define Install/hostapd
> $(INSTALL_DIR) $(1)/lib/wifi
> $(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/wifi/hostapd.sh
> + $(INSTALL_DIR) $(1)/etc
> + $(INSTALL_DATA) ./files/hostapd.vlan $(1)/etc/hostapd.vlan
> $(INSTALL_DIR) $(1)/usr/sbin
> endef
>
> _______________________________________________
> 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