patch-2.2.11 linux/net/bridge/br.c
Next file: linux/net/core/dev.c
Previous file: linux/net/ax25/af_ax25.c
Back to the patch index
Back to the overall index
- Lines: 56
- Date:
Mon Aug 9 12:05:05 1999
- Orig file:
v2.2.10/linux/net/bridge/br.c
- Orig date:
Sun Mar 7 15:25:23 1999
diff -u --recursive --new-file v2.2.10/linux/net/bridge/br.c linux/net/bridge/br.c
@@ -39,6 +39,8 @@
* Alan Cox: Merged Jean-Rene's stuff, reformatted stuff a bit
* so blame me first if its broken ;)
*
+ * Robert Pintarelli: fixed bug in bpdu time values
+ *
* Todo:
* Don't bring up devices automatically. Start ports disabled
* and use a netlink notifier so a daemon can maintain the bridge
@@ -284,13 +286,13 @@
config_bpdu.message_age = Zero; /* (4.6.1.3.2(5)) */
} else {
config_bpdu.message_age
- = message_age_timer[bridge_info.root_port].value
- + Message_age_increment; /* (4.6.1.3.2(6)) */
+ = (message_age_timer[bridge_info.root_port].value
+ + Message_age_increment) << 8; /* (4.6.1.3.2(6)) */
}
- config_bpdu.max_age = bridge_info.max_age;/* (4.6.1.3.2(7)) */
- config_bpdu.hello_time = bridge_info.hello_time;
- config_bpdu.forward_delay = bridge_info.forward_delay;
+ config_bpdu.max_age = bridge_info.max_age << 8;/* (4.6.1.3.2(7)) */
+ config_bpdu.hello_time = bridge_info.hello_time << 8;
+ config_bpdu.forward_delay = bridge_info.forward_delay << 8;
config_bpdu.top_change_ack =
port_info[port_no].top_change_ack;
/* (4.6.1.3.2(8)) */
@@ -363,10 +365,10 @@
static void record_config_timeout_values(Config_bpdu *config) /* (4.6.3) */
{
- bridge_info.max_age = config->max_age; /* (4.6.3.3) */
- bridge_info.hello_time = config->hello_time;
- bridge_info.forward_delay = config->forward_delay;
- bridge_info.top_change = config->top_change;
+ bridge_info.max_age = config->max_age >> 8; /* (4.6.3.3) */
+ bridge_info.hello_time = config->hello_time >> 8;
+ bridge_info.forward_delay = config->forward_delay >> 8;
+ bridge_info.top_change = config->top_change >> 8;
}
static void config_bpdu_generation(void)
@@ -1831,12 +1833,8 @@
/* printk("Flood to port %d\n",i);*/
nskb->nh.raw = nskb->data + ETH_HLEN;
-#if LINUX_VERSION_CODE >= 0x20100
nskb->priority = 1;
dev_queue_xmit(nskb);
-#else
- dev_queue_xmit(nskb,nskb->dev,1);
-#endif
}
}
return(0);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)