Displaying 5 results from an estimated 5 matches for "br_send_config_bpdu".
2007 Apr 18
4
[Bridge] [Patch] [2.6.7] Bridge - Fix BPDU message_age
..._age_timer.expires - jiffies;
-
- if (bpdu.max_age <= 0) bpdu.max_age = 1;
+ bpdu.message_age = br->max_age -
+ (root->message_age_timer.expires - jiffies) + 1;
}
bpdu.max_age = br->max_age;
bpdu.hello_time = br->hello_time;
bpdu.forward_delay = br->forward_delay;
- br_send_config_bpdu(p, &bpdu);
-
- p->topology_change_ack = 0;
- p->config_pending = 0;
-
- mod_timer(&p->hold_timer, jiffies + BR_HOLD_TIME);
+ if (bpdu.message_age < br->max_age) {
+ br_send_config_bpdu(p, &bpdu);
+ p->topology_change_ack = 0;
+ p->config_pending = 0;
+ mod_time...
2007 Apr 18
0
[Bridge] [PATCH 2.6] Fix message age in bridge STP config packets
...- jiffies;
-
- if (bpdu.max_age <= 0) bpdu.max_age = 1;
+ bpdu.message_age = br->max_age
+ - (root->message_age_timer.expires - jiffies)
+ + MESSAGE_AGE_INCR;
}
bpdu.max_age = br->max_age;
bpdu.hello_time = br->hello_time;
bpdu.forward_delay = br->forward_delay;
- br_send_config_bpdu(p, &bpdu);
-
- p->topology_change_ack = 0;
- p->config_pending = 0;
-
- mod_timer(&p->hold_timer, jiffies + BR_HOLD_TIME);
+ if (bpdu.message_age < br->max_age) {
+ br_send_config_bpdu(p, &bpdu);
+ p->topology_change_ack = 0;
+ p->config_pending = 0;
+ mod_time...
2007 Apr 18
1
[Bridge] [PATCH 2.4] Bridge STP message age
..._residue(&root->message_age_timer) + 1;
- bpdu.message_age = age;
+ bpdu.message_age = br_timer_get_residue(&root->message_age_timer)
+ + MESSAGE_AGE_INCR;
}
bpdu.max_age = br->max_age;
bpdu.hello_time = br->hello_time;
bpdu.forward_delay = br->forward_delay;
- br_send_config_bpdu(p, &bpdu);
+ if (bpdu.message_age < br->max_age) {
+ br_send_config_bpdu(p, &bpdu);
- p->topology_change_ack = 0;
- p->config_pending = 0;
- br_timer_set(&p->hold_timer, jiffies);
+ p->topology_change_ack = 0;
+ p->config_pending = 0;
+ br_timer_set(&p->...
2007 Apr 18
0
[Bridge] STP Explanation
...-------------------------------------------------------------------------------------------------------
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;
buf[5] = 0;
buf[6] = BPDU_TYPE_CONFIG;
buf[7] = (bpdu->topology_change ? 0x01 : 0) |
(bpdu->topology_change_ack ? 0x80 : 0);
buf[8] = bpdu-&...
2007 Apr 18
1
[Bridge] STP Explanation (2)
I saw some big mistakes, here's the correct version :
--------------------------------------------------------------------
void br_send_config_bpdu(struct net_bridge_port *p, struct bpdu *bpdu)
{
unsigned char buf[42];
buf[0] = bpdu->bpdu_header.protocol[0]; //0x00
buf[1] = bpdu->bpdu_header.protocol[1]; //0x00
buf[2] = bpdu->bpdu_header.version; //0x02
buf[3] = BPDU_TYPE_CONFIG;
buf[4] = bpdu->bpdu_body.flags.topo_change;...