summaryrefslogtreecommitdiffstats
path: root/contrib/diff/src/diff.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2015-05-28 18:34:02 +0000
committertuexen <tuexen@FreeBSD.org>2015-05-28 18:34:02 +0000
commit9794079730310dcf8d02f0659d77684f389f8eb7 (patch)
tree1f730ffb604e65d3211324be89e4f70d67bec3fd /contrib/diff/src/diff.c
parent05c1c03afa71dc36b5fb0718cbb68399a0e0e9a7 (diff)
downloadFreeBSD-src-9794079730310dcf8d02f0659d77684f389f8eb7.zip
FreeBSD-src-9794079730310dcf8d02f0659d77684f389f8eb7.tar.gz
Fix a bug where messages would not be sent in SHUTDOWN_RECEIVED state.
This problem was reported by Mark Bonnekessel and Markus Boese. Thanks to Irene Ruengeler for helping me to fix the cause of the problem. It can be tested with the following packetdrill script: +0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3 +0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) +0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 // Check the handshake with an empty(!) cookie +0.1 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) +0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...] +0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=10000, os=1, is=1, tsn=0, STATE_COOKIE[len=4, val=...]] +0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...] +0.1 < sctp: COOKIE_ACK[flgs=0] +0.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 +0.0 write(3, ..., 1024) = 1024 +0.0 > sctp: DATA[flgs=BE, len=1040, tsn=0, sid=0, ssn=0, ppid=0] +0.0 write(3, ..., 1024) = 1024 // Pending due to Nagle +0.0 < sctp: SHUTDOWN[flgs=0, cum_tsn=0] +0.0 > sctp: DATA[flgs=BE, len=1040, tsn=1, sid=0, ssn=1, ppid=0] +0.0 < sctp: SACK[flgs=0, cum_tsn=1, a_rwnd=10000, gaps=[], dups=[]] // Do we need another SHUTDOWN here? +0.0 > sctp: SHUTDOWN_ACK[flgs=0] +0.0 < sctp: SHUTDOWN_COMPLETE[flgs=0] +0.0 close(3) = 0 MFC after: 3 days
Diffstat (limited to 'contrib/diff/src/diff.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud