Skip to content

Commit

Permalink
[TCP] H-TCP: fix integer overflow
Browse files Browse the repository at this point in the history
When using H-TCP with a single flow on a 500Mbit connection (or less
actually), alpha can exceed 65000, so alpha needs to be a u32.

Signed-off-by: Gavin McCullagh <gavin.mccullagh@nuim.ie>
Signed-off-by: Doug Leith <doug.leith@nuim.ie>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Gavin McCullagh authored and David S. Miller committed Oct 26, 2006
1 parent 2211924 commit 2a272f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/tcp_htcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module_param(use_bandwidth_switch, int, 0644);
MODULE_PARM_DESC(use_bandwidth_switch, "turn on/off bandwidth switcher");

struct htcp {
u16 alpha; /* Fixed point arith, << 7 */
u32 alpha; /* Fixed point arith, << 7 */
u8 beta; /* Fixed point arith, << 7 */
u8 modeswitch; /* Delay modeswitch until we had at least one congestion event */
u32 last_cong; /* Time since last congestion event end */
Expand Down

0 comments on commit 2a272f9

Please sign in to comment.