summaryrefslogtreecommitdiff
path: root/net/bridge
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2013-02-11 08:22:22 (GMT)
committerDavid S. Miller <davem@davemloft.net>2013-02-11 19:16:52 (GMT)
commit547b4e718115eea74087e28d7fa70aec619200db (patch)
tree0e5b250f09d517e55173194527651c9fa64ba6bd /net/bridge
parentcfa82e020bc0be6ab9a1e3c186fe41f1e5cecf7a (diff)
downloadlinux-fsl-qoriq-547b4e718115eea74087e28d7fa70aec619200db.tar.xz
bridge: set priority of STP packets
Spanning Tree Protocol packets should have always been marked as control packets, this causes them to get queued in the high prirority FIFO. As Radia Perlman mentioned in her LCA talk, STP dies if bridge gets overloaded and can't communicate. This is a long-standing bug back to the first versions of Linux bridge. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_stp_bpdu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c
index 7f884e3..8660ea3 100644
--- a/net/bridge/br_stp_bpdu.c
+++ b/net/bridge/br_stp_bpdu.c
@@ -16,6 +16,7 @@
#include <linux/etherdevice.h>
#include <linux/llc.h>
#include <linux/slab.h>
+#include <linux/pkt_sched.h>
#include <net/net_namespace.h>
#include <net/llc.h>
#include <net/llc_pdu.h>
@@ -40,6 +41,7 @@ static void br_send_bpdu(struct net_bridge_port *p,
skb->dev = p->dev;
skb->protocol = htons(ETH_P_802_2);
+ skb->priority = TC_PRIO_CONTROL;
skb_reserve(skb, LLC_RESERVE);
memcpy(__skb_put(skb, length), data, length);