summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/putc.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-02-18 00:52:17 +0000
committerrwatson <rwatson@FreeBSD.org>2005-02-18 00:52:17 +0000
commit794d97253e6bf4b3a9241a46708329f2087b6e6b (patch)
tree5b715dae60c43557996de5015cfb96cd66d53434 /lib/libc/stdio/putc.c
parentd49b95d8a801a168c891631734fe9de0807d6485 (diff)
downloadFreeBSD-src-794d97253e6bf4b3a9241a46708329f2087b6e6b.zip
FreeBSD-src-794d97253e6bf4b3a9241a46708329f2087b6e6b.tar.gz
In solisten(), unconditionally set the SO_ACCEPTCONN option in
so->so_options when solisten() will succeed, rather than setting it conditionally based on there not being queued sockets in the completed socket queue. Otherwise, if the protocol exposes new sockets via the completed queue before solisten() completes, the listen() system call will succeed, but the socket and protocol state will be out of sync. For TCP, this didn't happen in practice, as the TCP code will panic if a new connection comes in after the tcpcb has been transitioned to a listening state but the socket doesn't have SO_ACCEPTCONN set. This is historical behavior resulting from bitrot since 4.3BSD, in which that line of code was associated with the conditional NULL'ing of the connection queue pointers (one-time initialization to be performed during the transition to a listening socket), which are now initialized separately. Discussed with: fenner, gnn MFC after: 3 days
Diffstat (limited to 'lib/libc/stdio/putc.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud