From: Gavin McCullagh Subject: [PATCH] fix integer overflow in H-TCP congestion control Date: Tue, 24 Oct 2006 15:17:39 +0100 Message-ID: <20061024141739.GB18364@nuim.ie> Reply-To: Gavin McCullagh Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT Cc: Douglas Leith , Baruch Even Return-path: Received: from mail.nuim.ie ([149.157.1.19]:2295 "EHLO LARCH.MAY.IE") by vger.kernel.org with ESMTP id S1030397AbWJXOSL (ORCPT ); Tue, 24 Oct 2006 10:18:11 -0400 Received: from retina-bcl.hamilton.local ([149.157.192.252]) by NUIM.IE (PMDF V6.2-X17 #30789) with ESMTPA id <01M8QQ0CFNNU017H37@NUIM.IE> for netdev@vger.kernel.org; Tue, 24 Oct 2006 15:17:53 +0000 (GMT) To: NetDev Content-disposition: inline Sender: netdev-owner@vger.kernel.org List-Id: netdev.vger.kernel.org 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 Signed-off-by: Doug Leith diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c index 6edfe5e..8072b6d 100644 --- a/net/ipv4/tcp_htcp.c +++ b/net/ipv4/tcp_htcp.c @@ -23,7 +23,7 @@ module_param(use_bandwidth_switch, int, 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 */