cvs commit: src/sys/kern uipc_syscalls.c
Andre Oppermann
andre at FreeBSD.org
Sun Nov 12 20:57:01 UTC 2006
andre 2006-11-12 20:57:00 UTC
FreeBSD src repository
Modified files:
sys/kern uipc_syscalls.c
Log:
In kern_sendfile() fix the calculation of sbytes (the total number of bytes
written to the socket). The rewrite in revision 1.240 got confused by the
FreeBSD 4.x bug compatibility code.
For some reason lighttpd, that was used for testing the new sendfile code,
was not affected by the problem but apache and others using headers/trailers
in the sendfile call received incorrect sbytes values after return from non-
blocking sockets. This then lead to restarts with wrong offsets and thus
mixed up file contents when the socket was writeable again. All programs
not using headers/trailers, like ftpd, were not affected by the bug.
Reported by: Pawel Worach <pawel.worach-at-gmail.com>
Tested by: Pawel Worach <pawel.worach-at-gmail.com>
Revision Changes Path
1.245 +19 -23 src/sys/kern/uipc_syscalls.c
More information about the cvs-src
mailing list