it will cause bind to succeed on port conflicts.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1428
e7ae566f-a301-0410-adde-
c780ea21d3b5
if ((sd = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
msg (M_SOCKERR, "Cannot create TCP socket");
+#ifndef WIN32 /* using SO_REUSEADDR on Windows will cause bind to succeed on port conflicts! */
/* set SO_REUSEADDR on socket */
{
int on = 1;
(void *) &on, sizeof (on)) < 0)
msg (M_SOCKERR, "TCP: Cannot setsockopt SO_REUSEADDR on TCP socket");
}
+#endif
#if 0
/* set socket linger options */