]> git.karo-electronics.de Git - linux-beck.git/commitdiff
bridge: change BR_GROUPFWD_RESTRICTED to allow forwarding of LLDP frames
authorBernhard Thaler <bernhard.thaler@wvnet.at>
Mon, 4 May 2015 20:47:13 +0000 (22:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 May 2015 23:20:28 +0000 (19:20 -0400)
BR_GROUPFWD_RESTRICTED bitmask restricts users from setting values to
/sys/class/net/brX/bridge/group_fwd_mask that allow forwarding of
some IEEE 802.1D Table 7-10 Reserved addresses:

(MAC Control) 802.3 01-80-C2-00-00-01
(Link Aggregation) 802.3 01-80-C2-00-00-02
802.1AB LLDP 01-80-C2-00-00-0E

Change BR_GROUPFWD_RESTRICTED to allow to forward LLDP frames and document
group_fwd_mask.

e.g.
   echo 16384 > /sys/class/net/brX/bridge/group_fwd_mask
allows to forward LLDP frames.

This may be needed for bridge setups used for network troubleshooting or
any other scenario where forwarding of LLDP frames is desired (e.g. bridge
connecting a virtual machine to real switch transmitting LLDP frames that
virtual machine needs to receive).

Tested on a simple bridge setup with two interfaces and host transmitting
LLDP frames on one side of this bridge (used lldpd). Setting group_fwd_mask
as described above lets LLDP frames traverse bridge.

Signed-off-by: Bernhard Thaler <bernhard.thaler@wvnet.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/ABI/testing/sysfs-class-net
net/bridge/br_private.h

index 5ecfd72ba684c35acce51273d4370258b147ffb8..668604fc8e062bc7d7d4fc363aec6db48b00d6e8 100644 (file)
@@ -39,6 +39,25 @@ Description:
                Format is a string, e.g: 00:11:22:33:44:55 for an Ethernet MAC
                address.
 
+What:          /sys/class/net/<bridge iface>/bridge/group_fwd_mask
+Date:          January 2012
+KernelVersion: 3.2
+Contact:       netdev@vger.kernel.org
+Description:
+               Bitmask to allow forwarding of link local frames with address
+               01-80-C2-00-00-0X on a bridge device. Only values that set bits
+               not matching BR_GROUPFWD_RESTRICTED in net/bridge/br_private.h
+               allowed.
+               Default value 0 does not forward any link local frames.
+
+               Restricted bits:
+               0: 01-80-C2-00-00-00 Bridge Group Address used for STP
+               1: 01-80-C2-00-00-01 (MAC Control) 802.3 used for MAC PAUSE
+               2: 01-80-C2-00-00-02 (Link Aggregation) 802.3ad
+
+               Any values not setting these bits can be used. Take special
+               care when forwarding control frames e.g. 802.1X-PAE or LLDP.
+
 What:          /sys/class/net/<iface>/broadcast
 Date:          April 2005
 KernelVersion: 2.6.12
index 3362c29400f182c90db6e67a04fcc5018906fa41..1f36fa70639b7ca0657090c86a7f9d4bb67b1090 100644 (file)
@@ -33,8 +33,8 @@
 
 /* Control of forwarding link local multicast */
 #define BR_GROUPFWD_DEFAULT    0
-/* Don't allow forwarding control protocols like STP and LLDP */
-#define BR_GROUPFWD_RESTRICTED 0x4007u
+/* Don't allow forwarding of control protocols like STP, MAC PAUSE and LACP */
+#define BR_GROUPFWD_RESTRICTED 0x0007u
 /* The Nearest Customer Bridge Group Address, 01-80-C2-00-00-[00,0B,0C,0D,0F] */
 #define BR_GROUPFWD_8021AD     0xB801u