Turn off SO_REUSEADDR and SO_REUSEPORT, they were causing EADDRINUSE

to be returned from the protocol stack.

Pointy hat to me for not groking what those options _really_ mean.
This commit is contained in:
Alfred Perlstein 2004-07-13 05:42:59 +00:00
parent b4828720f7
commit 8f0a7125a1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132084

View File

@ -160,7 +160,7 @@ nfs_connect(struct nfsmount *nmp, struct nfsreq *rep)
{
struct socket *so;
int error, rcvreserve, sndreserve;
int opt, pktscale;
int pktscale;
struct sockaddr *saddr;
struct thread *td = &thread0; /* only used for socreate and sobind */
@ -175,10 +175,6 @@ nfs_connect(struct nfsmount *nmp, struct nfsreq *rep)
so = nmp->nm_so;
nmp->nm_soflags = so->so_proto->pr_flags;
opt = 1;
(void)so_setsockopt(so, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
(void)so_setsockopt(so, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt));
/*
* Some servers require that the client port be a reserved port number.
*/