I have not seen any important TCP/IP server not use SO_REUSEADDR :
- Apache HTTP Server SO_REUSEADDR usage
- nginx SO_REUSEADDR usage
- Very Secure FTPD SO_REUSEADDR usage
- exim SO_REUSEADDR usage
- Postfix SO_REUSEADDR usage
- OpenSSH SO_REUSEADDR usage
Is there any use case for not using SO_REUSEADDR on TCP/IP servers ?
I mean, would making the OS always use SO_REUSEADDR break any server that does not use it?
Do you know a TCP/IP server that not uses SO_REUSEADDR for a reason?
(of course you may not want to use it on MSWindows as it allows to run two servers on the same port)
Of course there is a very valid reason for not using SO_REUSEADDR by default.
It would allow ANY process to bind to the same listening socket as a sensitive Internet service and accept connections on its behalf! That permits unlimited eavesdropping and man-in-the-middling.
Well, UNP (Stevens 2004) says: