[PATCHv3 0/6] add support for tagged vlans
michael-dev at fami-braun.de
michael-dev
Thu Apr 11 02:52:38 PDT 2013
From: Michael Braun <michael-dev at fami-braun.de>
Hi,
this patch series adds support for tagged vlan support with hostapd.
This allows stations to receive one or more vlans simultaneously just as
if it were connected to a switchport.
Implementation:
- For each untagged+tagged VLAN combination, a vlan_id is generated and
use for the WPA group machine (and WEP) as well as the VLAN interface.
- The tagged VLANs get added to the VLAN interface and are put into
their own bridges.
- tagged/untagged > MAX_VLAN_ID is checked in radius.c and config_file.c
code.
Example:
An station connects to wlan0_2 and gets VLAN 77 assigned untagged and vlan 501
assigned tagged. This is the first station to connect. Then it'll be moved into
wlan0_2.1, wlan0_2.1.501 is added using 802.1q and finally wlan0_2.1 is put into
brvlan77 and wlan0_2.1.501 is put into brvlan501.
I've tested using kernel 3.8.3 that this works (i.e. the station gets dhcp in
both VLANs and pings well) and does not result in vlan-501 tagged frames to
appear on brvlan77.
Regards,
M. Braun
v2: fix untagged=0, num_tagged > 0 -> do not create vid=0 interface and bridge
v3: fix untagged=0, num_tagged > 0 -> keep ifconfig_up
Michael Braun (6):
add CONFIG_VLAN_TAGGED configuration option
vlan: transform untagged/tagged vlan description into vlan_id
vlan_id can be greater than MAX_VLAN_ID, as it no longer means
untagged/tagged vlan id
parse untagged/tagged VLANs from config files
radius: parse tagged vlan information
vlan: use untagged/tagged for vlan configuration
hostapd/Makefile | 3 +
hostapd/config_file.c | 124 ++++++++++++++++++++--
hostapd/defconfig | 3 +
hostapd/hostapd.conf | 14 ++-
src/ap/ieee802_1x.c | 2 +-
src/ap/vlan_init.c | 283 ++++++++++++++++++++++++++++++++++++++------------
src/ap/vlan_init.h | 16 +++
src/radius/radius.c | 45 +++++++-
src/radius/radius.h | 1 +
9 files changed, 407 insertions(+), 84 deletions(-)
--
1.8.1.5
More information about the Hostap
mailing list