From: Stephen Hemminger <shemminger@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, bridge@linux-foundation.org
Subject: [PATCH 3/4] bridge: if no STP then forward all BPDUs
Date: Wed, 25 Apr 2007 16:47:40 -0700 [thread overview]
Message-ID: <20070425234950.768857110@linux-foundation.org> (raw)
In-Reply-To: 20070425234737.727790594@linux-foundation.org
[-- Attachment #1: bridge-no-stp-bpdu.patch --]
[-- Type: text/plain, Size: 1058 bytes --]
If a bridge is not running STP, then it has no way to detect a cycle
in the network. But if it is not running STP and some other machine
or device is running STP, then if STP BPDU's get forwarded to it can
detect the cycle.
This is how the old 2.4 and early 2.6 code worked.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
---
net/bridge/br_input.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--- bridge-2.6.22.orig/net/bridge/br_input.c
+++ bridge-2.6.22/net/bridge/br_input.c
@@ -136,8 +136,14 @@ struct sk_buff *br_handle_frame(struct n
if (skb->protocol == htons(ETH_P_PAUSE))
goto drop;
- return (NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev,
- NULL, br_handle_local_finish) == 0) ? skb : NULL;
+ /* Process STP BPDU's through normal netif_receive_skb() path */
+ if (p->br->stp_enabled != BR_NO_STP) {
+ if (NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev,
+ NULL, br_handle_local_finish))
+ return NULL;
+ else
+ return skb;
+ }
}
switch (p->state) {
--
next prev parent reply other threads:[~2007-04-25 23:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-25 23:47 [PATCH 0/4] Bridge patches for 2.6.22 Stephen Hemminger
2007-04-25 23:47 ` [PATCH 1/4] bridge: don't change packet type Stephen Hemminger
2007-04-26 5:05 ` David Miller
2007-04-25 23:47 ` [PATCH 2/4] bridge: drop PAUSE frames Stephen Hemminger
2007-04-26 5:07 ` David Miller
2007-04-25 23:47 ` Stephen Hemminger [this message]
2007-04-25 23:47 ` [PATCH 4/4] bridge: missing rtnl Stephen Hemminger
2007-04-26 5:08 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070425234950.768857110@linux-foundation.org \
--to=shemminger@linux-foundation.org \
--cc=bridge@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).