linux/net/dccp
Gerrit Renker b2449fdc30 [DCCP]: Fix bug in the calculation of very low sending rates
This fixes an error in the calculation of t_ipi when X converges towards
very low sending rates (between 1 and 64 bytes per second).

Although this case may not sound likely, it can be reproduced by connecting,
hitting enter (1 byte sent) and waiting for some time, during which the
nofeedback timer halves the sending rate until finally it reaches the region
1..64 bytes/sec. Computing X is handled correctly (tested separately); but by
dividing X _before_ entering the calculation of t_ipi, X becomes zero as
a result.  This in turn triggers a BUG condition caught in scaled_div().

Fixed by replacing with equivalent statement and explicit typecast for good
measure.

Calculation verified and effect of patch tested - reduced never below 1 byte
per 64 seconds afterwards, i.e. not allowing divide-by-zero.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25 22:28:54 -07:00
..
ccids [DCCP]: Fix bug in the calculation of very low sending rates 2007-04-25 22:28:54 -07:00
ackvec.c [DCCP]: 48-bit sequence number arithmetic 2007-04-25 22:26:42 -07:00
ackvec.h [DCCP] ackvec: infrastructure for sending more than one ackvec per packet 2006-12-02 21:30:32 -08:00
ccid.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
ccid.h [DCCP] ccid: Deprecate ccid_hc_tx_insert_options 2006-12-11 14:34:49 -08:00
dccp.h [DCCP]: Provide function for RTT sampling 2007-04-25 22:27:00 -07:00
diag.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
feat.c [NET] DCCP: Fix whitespace errors. 2007-02-10 23:19:27 -08:00
feat.h [NET] DCCP: Fix whitespace errors. 2007-02-10 23:19:27 -08:00
input.c [DCCP]: Sample RTT from SYN exchange 2007-04-25 22:27:02 -07:00
ipv4.c [SK_BUFF]: Introduce icmp_hdr(), remove skb->h.icmph 2007-04-25 22:25:23 -07:00
ipv6.c [SK_BUFF]: Introduce ipv6_hdr(), remove skb->nh.ipv6h 2007-04-25 22:25:14 -07:00
ipv6.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
Kconfig [DCCP]: enable debug messages also for static builds 2006-12-02 21:24:35 -08:00
Makefile [DCCPv6]: Resolve conditional build problem 2006-12-02 21:22:28 -08:00
minisocks.c [DCCP]: Set RTO for newly created child socket 2007-03-06 14:24:44 -08:00
options.c [DCCP]: Sample RTT from SYN exchange 2007-04-25 22:27:02 -07:00
output.c [DCCP]: More debug information for dccp_wait_for_ccid 2007-04-25 22:26:54 -07:00
probe.c [CCID3]: More to see in dccp_probe 2007-04-25 22:26:56 -07:00
proto.c [DCCP] getsockopt: Fix DCCP_SOCKOPT_[SEND,RECV]_CSCOV 2007-03-28 11:54:32 -07:00
sysctl.c [PATCH] sysctl: remove insert_at_head from register_sysctl 2007-02-14 08:09:59 -08:00
timer.c [DCCP]: make dccp_write_xmit_timer() static again 2007-03-25 18:48:10 -07:00