freebsd-dev/sys
John Baldwin f701e30d7f Handle a rare edge case with nearly full TCP receive buffers. If a TCP
buffer fills up causing the remote sender to enter into persist mode, but
there is still room available in the receive buffer when a window probe
arrives (either due to window scaling, or due to the local application
very slowing draining data from the receive buffer), then the single byte
of data in the window probe is accepted.  However, this can cause rcv_nxt
to be greater than rcv_adv.  This condition will only last until the next
ACK packet is pushed out via tcp_output(), and since the previous ACK
advertised a zero window, the ACK should be pushed out while the TCP
pcb is write-locked.

During the window while rcv_nxt is greather than rcv_adv, a few places
would compute the remaining receive window via rcv_adv - rcv_nxt.
However, this value was then (uint32_t)-1.  On a 64 bit machine this
could expand to a positive 2^32 - 1 when cast to a long.  In particular,
when calculating the receive window in tcp_output(), the result would be
that the receive window was computed as 2^32 - 1 resulting in advertising
a far larger window to the remote peer than actually existed.

Fix various places that compute the remaining receive window to either
assert that it is not negative (i.e. rcv_nxt <= rcv_adv), or treat the
window as full if rcv_nxt is greather than rcv_adv.

Reviewed by:	bz
MFC after:	1 month
2011-05-02 21:05:52 +00:00
..
amd64 Add implementations of BUS_ADJUST_RESOURCE() to the PCI bus driver, 2011-05-02 14:13:12 +00:00
arm Change rman_manage_region() to actually honor the rm_start and rm_end 2011-04-29 18:41:21 +00:00
boot Turn PBVM page table entries into PTEs so that they can be inserted 2011-04-30 20:16:49 +00:00
bsm Add ECAPMODE, "Not permitted in capability mode", a new kernel errno 2011-03-01 13:14:28 +00:00
cam Make CAM_DEBUG_CDB also dump ATA commands in addition to SCSI. 2011-04-29 07:14:37 +00:00
cddl Fix deduplicated zfs receive 2011-04-30 14:52:49 +00:00
compat Regen. 2011-04-18 16:32:47 +00:00
conf Add -Wmissing-include-dirs to CWARNFLAGS, so tinderbox will punish those 2011-05-02 10:35:27 +00:00
contrib Make pf compile without INET support by adding #ifdef INETs and 2011-04-27 19:34:01 +00:00
crypto Fix a bug in the result of manual assembly. 2011-03-02 14:56:58 +00:00
ddb Trim some additional unnecessary <linker_set.h> includes. 2011-04-28 17:59:33 +00:00
dev Correct spelling in comments. 2011-05-02 21:04:23 +00:00
fs Add the kernel support needed to zero out the nfsstats 2011-05-01 22:19:52 +00:00
gdb Modify kdb_trap() so that it re-calls the dbbe_trap function as long as 2011-02-18 22:25:11 +00:00
geom Implement relaxed comparision for hardcoded provider names to make it 2011-04-27 00:10:26 +00:00
gnu Fix typos - remove duplicate "the". 2011-02-21 09:01:34 +00:00
i386 All PCI based wireless drivers seem to be explicitly removed from the 2011-05-02 16:51:02 +00:00
ia64 Don't use the whole region 5 for KVA, because the CPU may not implement all 2011-05-02 17:49:05 +00:00
isa - Enable an extra debugging bootverbose printf when probing ISA PNP cards 2011-03-29 12:38:13 +00:00
kern Add a new bus method, BUS_ADJUST_RESOURCE() that is intended to be a 2011-04-29 21:36:45 +00:00
kgssapi
libkern Fix typos - remove duplicate "is". 2011-02-23 09:22:33 +00:00
mips Add in the work-around for the AR8316 gige switch PHY. 2011-05-02 10:42:19 +00:00
modules Update carp, gre and pf module builds to be depenent on INET and/or 2011-04-30 17:59:54 +00:00
net LACP frames must not be send VLAN-tagged, check for that before processing. 2011-04-30 20:34:52 +00:00
net80211 We need in.h for both INET and INET6, as according to RFC 3493 it 2011-04-25 16:37:47 +00:00
netatalk
netgraph LibAliasInit() should allocate memory with M_WAITOK flag. Modify it 2011-04-18 20:07:08 +00:00
netinet Handle a rare edge case with nearly full TCP receive buffers. If a TCP 2011-05-02 21:05:52 +00:00
netinet6 Improve compilation of SCTP code without INET support. 2011-04-30 11:18:16 +00:00
netipsec Make IPsec compile without INET adding appropriate #ifdef checks. 2011-04-27 19:28:42 +00:00
netipx
netnatm
netncp
netsmb Change some variables from int to size_t. This is more accurate since 2011-01-08 23:06:54 +00:00
nfs Add the kernel support needed to zero out the nfsstats 2011-05-01 22:19:52 +00:00
nfsclient Fix module names and dependencies so the NFS clients will 2011-04-27 20:42:30 +00:00
nfsserver Add some FEATURE macros for various features (AUDIT/CAM/IPC/KTR/MAC/NFS/NTP/ 2011-02-25 10:11:01 +00:00
nlm sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. 2011-01-12 19:54:19 +00:00
ofed - Catch up to falloc() changes. 2011-04-26 07:30:52 +00:00
opencrypto After the r219999 is merged to stable/8, rename fallocf(9) to falloc(9) 2011-04-01 13:28:34 +00:00
pc98 This patch changes head so that the default NFS client is now the new 2011-04-27 17:51:51 +00:00
pci Do a sweep of the tree replacing calls to pci_find_extcap() with calls to 2011-03-23 13:10:15 +00:00
powerpc Add the watchdogs patting during the (shutdown time) disk syncing and 2011-04-28 16:02:05 +00:00
rpc This patch is believed to fix a problem in the kernel rpc for 2011-04-27 18:19:26 +00:00
security - Add a FEATURE for capsicum (security_capabilities). 2011-03-04 09:03:54 +00:00
sparc64 This patch changes head so that the default NFS client is now the new 2011-04-27 17:51:51 +00:00
sun4v This patch changes head so that the default NFS client is now the new 2011-04-27 17:51:51 +00:00
sys Add a new bus method, BUS_ADJUST_RESOURCE() that is intended to be a 2011-04-29 21:36:45 +00:00
teken
tools GNU awk does not output escaped newlines in multi-line printc statements. This 2011-03-31 21:33:33 +00:00
ufs Fix typos. 2011-04-30 22:46:02 +00:00
vm Reap old SPL comments. 2011-04-26 22:18:53 +00:00
x86 Fix build with clang. Please note there is an LLVM/Clang PR: 2011-05-02 17:08:36 +00:00
xdr
xen Fix a few more SYSCTL_PROC() that were missing a CTLFLAG type specifier. 2011-01-19 00:57:58 +00:00
Makefile