[PATCH 0/6] add support for tagged vlans

michael-dev at fami-braun.de michael-dev
Mon Apr 8 09:18:35 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

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    | 279 ++++++++++++++++++++++++++++++++++++++------------
 src/ap/vlan_init.h    |  16 +++
 src/radius/radius.c   |  45 +++++++-
 src/radius/radius.h   |   1 +
 9 files changed, 403 insertions(+), 84 deletions(-)

-- 
1.8.1.5




More information about the Hostap mailing list