Displaying 5 results from an estimated 5 matches for "br_stp_bpdu".
2007 Apr 18
4
[Bridge] [Patch] [2.6.7] Bridge - Fix BPDU message_age
Fixes message_age field update in config BPDUs. Also checks whether the BPDU
message age has exceeded bridge max age before transmitting config BPDUs.
Signed-off-by: Kishore A K <KishoreAK@myw.ltindia.com>
Index: linux-2.6.7/net/bridge/br_stp.c
=============================================================
--- linux-2.6.7/net/bridge/br_stp.c.orig 2004-06-17 20:17:27.000000000 +0530
+++
2007 Apr 18
0
[Bridge] [PATCH] bridge: random extra bytes on STP TCN packet
We seem to send 3 extra bytes in a TCN, which will be whatever happens
to be on the stack. Thanks to Aji_Srinivas@emc.com for seeing.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
diff -Naur a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c
--- a/net/bridge/br_stp_bpdu.c 2006-09-03 23:40:08.000000000 +0530
+++ b/net/bridge/br_stp_bpdu.c 2006-09-03 23:40:33.000000000 +0530
@@ -121,7 +121,7 @@
buf[1] = 0;
buf[2] = 0;
buf[3] = BPDU_TYPE_TCN;
- br_send_bpdu(p, buf, 7);
+ br_send_bpdu(p, buf, 4);
}
/*
2007 Apr 18
0
[Bridge] [PATCH] (4/6) bridge: prevent bad forwarding table updates
..._addr(eth_hdr(skb)->h_source))
goto err;
- if (p->state == BR_STATE_LEARNING ||
- p->state == BR_STATE_FORWARDING)
+ if (p->state == BR_STATE_LEARNING)
br_fdb_update(p->br, p, eth_hdr(skb)->h_source);
if (p->br->stp_enabled &&
Index: bridge/net/bridge/br_stp_bpdu.c
===================================================================
--- bridge.orig/net/bridge/br_stp_bpdu.c
+++ bridge/net/bridge/br_stp_bpdu.c
@@ -140,6 +140,9 @@ int br_stp_handle_bpdu(struct sk_buff *s
struct net_bridge *br = p->br;
unsigned char *buf;
+ /* insert into forwarding dat...
2007 Apr 18
0
[Bridge] Bridging with STP seems to learn mac-address on wrong ports
..., and since the port is blocking this fails.
It seems that the STP-bpdu's are responsible for the bridge learning
the mac-address on the wrong port.
This is tested with kernel 2.6.11.12 and 2.6.13.2, and both exhibit
this problem.
The following fix solved it for me on 2.6.11.12:
In net/bridge/br_stp_bpdu.c, in function br_stp_handle_bpdu i changed
br_fdb_insert(p->br, p, eth_hdr(skb)->h_source,0);
to
if (!br->stp_enabled || p->state == BR_STATE_LEARNING
|| p->state == BR_STATE_FORWARDING)
br_fdb_insert(p->br, p, eth_hdr(skb)->h_source...
2007 Apr 18
0
[Bridge] STP Explanation
...rd_delay[2];
} bpdu_body;
typedef struct
{
bpdu_header hdr;
bpdu_body body;
unsigned char ver_1_len[2];// ?
}bpdu;
--------------------------------------------------------------------------------------------------------------------------
but i'm perplex with this following function in br_stp_bpdu.c :
-------------------------------------------------------------------------------------------------------------------------
void br_send_config_bpdu(struct net_bridge_port *p, struct bpdu *bpdu)
{
unsigned char buf[38];
buf[0] = 0x42;
buf[1] = 0x42;
buf[2] = 0x03;
buf[3] = 0;
buf[4] = 0;...