]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[TCP] H-TCP: fix integer overflow
authorGavin McCullagh <gavin.mccullagh@nuim.ie>
Thu, 26 Oct 2006 06:05:52 +0000 (23:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Oct 2006 06:05:52 +0000 (23:05 -0700)
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>
net/ipv4/tcp_htcp.c

index 682e7d5b6f2f80ac3f23aabd337a60278531c176..283be3cb46670a96114665ef4b1d1e2bb0e7bc98 100644 (file)
@@ -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 */