Patchwork [1/6] add CONFIG_VLAN_TAGGED configuration option

login
register
mail settings
Submitter michael-dev@fami-braun.de
Date April 8, 2013, 4:18 p.m.
Message ID <1365437921-11715-2-git-send-email-michael-dev@fami-braun.de>
Download mbox | patch
Permalink /patch/234830/
State Superseded
Headers show

Comments

michael-dev@fami-braun.de - April 8, 2013, 4:18 p.m.
From: Michael Braun <michael-dev@fami-braun.de>

Signed-hostap: Michael Braun <michael-dev@fami-braun.de>
---
 hostapd/Makefile     |  3 +++
 hostapd/defconfig    |  3 +++
 hostapd/hostapd.conf | 14 ++++++++++----
 3 files changed, 16 insertions(+), 4 deletions(-)

Patch

diff --git a/hostapd/Makefile b/hostapd/Makefile
index cc29031..549021b 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -132,6 +132,9 @@  CFLAGS += -DCONFIG_VLAN_NETLINK
 CFLAGS += -I /usr/include/libnl3
 LIBS += -lnl-3 -lnl-genl-3 -lnl-route-3 -lnl-nf-3 -lnl-cli-3
 endif
+ifdef CONFIG_VLAN_TAGGED
+CFLAGS += -DCONFIG_VLAN_TAGGED
+endif
 endif
 
 ifdef CONFIG_NO_CTRL_IFACE
diff --git a/hostapd/defconfig b/hostapd/defconfig
index b5ddca3..a0a7d2c 100644
--- a/hostapd/defconfig
+++ b/hostapd/defconfig
@@ -171,6 +171,9 @@  CONFIG_IPV6=y
 # Note: This requires libnl 3.1 or newer.
 #CONFIG_VLAN_NETLINK=y
 
+# Enable support for tagged VLANs.
+# CONFIG_VLAN_TAGGED=y
+
 # Remove support for dumping state into a file on SIGUSR1 signal
 # This can be used to reduce binary size at the cost of disabling a debugging
 # option.
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index 49b60bd..39de88d 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -812,10 +812,14 @@  own_ip_addr=127.0.0.1
 
 # Dynamic VLAN mode; allow RADIUS authentication server to decide which VLAN
 # is used for the stations. This information is parsed from following RADIUS
-# attributes based on RFC 3580 and RFC 2868: Tunnel-Type (value 13 = VLAN),
-# Tunnel-Medium-Type (value 6 = IEEE 802), Tunnel-Private-Group-ID (value
-# VLANID as a string). Optionally, the local MAC ACL list (accept_mac_file) can
-# be used to set static client MAC address to VLAN ID mapping.
+# attributes based on RFC 3580, RFC 2868 and RFC 4675:
+#  a) Tunnel-Type (value 13 = VLAN), Tunnel-Medium-Type (value 6 = IEEE 802),
+#     Tunnel-Private-Group-ID (value VLANID as a string)
+#  b) Egress-VLAN-ID (see RFC 4675).
+# Optionally, the local MAC ACL list (accept_mac_file) can be used to set
+# static client MAC address to VLAN ID mapping. If tagged vlans are used,
+# append "t" and the tagged vlan id to the untagged vlan id (multiple times
+# if needed).
 # 0 = disabled (default)
 # 1 = option; use default interface if RADIUS server does not include VLAN ID
 # 2 = required; reject authentication if RADIUS server does not include VLAN ID
@@ -827,6 +831,8 @@  own_ip_addr=127.0.0.1
 # multiple BSSIDs or SSIDs. Each line in this text file is defining a new
 # interface and the line must include VLAN ID and interface name separated by
 # white space (space or tab).
+# If tagged vlans are used, append "t" and the tagged vlan id to the untagged
+# vlan id (multiple times if needed).
 # If no entries are provided by this file, the station is statically mapped
 # to <bss-iface>.<vlan-id> interfaces.
 #vlan_file=/etc/hostapd.vlan