summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2012-10-29 12:31:12 +0000
committerandre <andre@FreeBSD.org>2012-10-29 12:31:12 +0000
commit845b471915bebf6248823eea86a57051f9514c1f (patch)
tree0cc9b380116c2f4ac184f0d6eb14316dafaadeb6 /sys/netinet/tcp_output.c
parentabf1521166bc2ccc4e2c69c8af6f0a3411923597 (diff)
downloadFreeBSD-src-845b471915bebf6248823eea86a57051f9514c1f.zip
FreeBSD-src-845b471915bebf6248823eea86a57051f9514c1f.tar.gz
In soreceive_stream() don't drop an already dequeued mbuf chain by
overwriting the return mbuf pointer with newly received data after a loop. Instead append the new mbuf chain to the existing one. Fix up sb_lastrecord when dequeuing mbuf's so that sbappend_stream() doesn't get confused. For the remainder copy case in the mbuf delivery part deduct the copied length len instead of the whole mbuf length. Additionally don't depend on 'n' being being available which isn't true in the case of MSG_PEEK. Fix the MSG_WAITALL case by comparing against sb_hiwat. Before it was looping for every receive as sb_lowat normally is zero. Add comment about issue with (MSG_WAITALL | MSG_PEEK) which isn't properly handled. Submitted by: trociny (except for the change in last paragraph)
Diffstat (limited to 'sys/netinet/tcp_output.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud