]> git.proxmox.com Git - mirror_iproute2.git/commit
bridge: Add vlan configuration support
authorVlad Yasevich <vyasevic@redhat.com>
Thu, 28 Feb 2013 10:04:05 +0000 (10:04 +0000)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 6 Mar 2013 19:03:08 +0000 (11:03 -0800)
commit9eff0e5cc44770137fd0e383f80d0eaab948a03c
treec4e669df7b68053d99d5a313613beb356ae04d56
parentfd08839c7312eecf31ab2e0156cb645394ac9f14
bridge: Add vlan configuration support

Recent kernel patches added support for VLAN filtering on the bridge.
This functionality allows one to turn a basic bridge into a VLAN bridge,
where VLANs dicatate packet forwarding and header transformation.

To configure the VLANs on the bridge and its ports a new command is
added to the 'bridge' utility.

   # bridge vlan add dev eth0 vid 10 pvid untagged brdev
   # bridge vlan add
   # bridge vlan delete dev eth0 vid 10
   # bridge vlan show

This command supports the following flags:
   master - peform the operation on the software bridge device.  This is
    the default behavior.
   self  -  perform the operation on the hardware associated with the port.
            This flag is required when the device is the bridge device and
    the configuration is desired on the bridge device itself (not
    one of the ports).
   pvid  -  Set the PVID (port vlan id) for a given port.  Any untagged
            frames arriving on the port will be assigned to this vlan.
   untagged - Sets the egress policy of for a given vlan.  Default port
            egress policy is tagged.  Set this flag if you wish traffic
            associated with this VLAN to exit the port untagged.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
bridge/Makefile
bridge/br_common.h
bridge/bridge.c
bridge/vlan.c [new file with mode: 0644]
include/libnetlink.h
lib/libnetlink.c