Fixed bug where UDP was required to mount a TCP NFS filesystem.
Submitted by: Ken Hornstein, Sept.'94
This commit is contained in:
parent
bef6490904
commit
a2d169021d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8723
@ -522,15 +522,19 @@ getnfsargs(spec, nfsargsp)
|
|||||||
saddr.sin_family = AF_INET;
|
saddr.sin_family = AF_INET;
|
||||||
saddr.sin_port = htons(PMAPPORT);
|
saddr.sin_port = htons(PMAPPORT);
|
||||||
if ((tport = pmap_getport(&saddr, RPCPROG_NFS,
|
if ((tport = pmap_getport(&saddr, RPCPROG_NFS,
|
||||||
NFS_VER2, IPPROTO_UDP)) == 0) {
|
NFS_VER2, nfsargsp->sotype == SOCK_STREAM ? IPPROTO_TCP :
|
||||||
|
IPPROTO_UDP)) == 0) {
|
||||||
if ((opflags & ISBGRND) == 0)
|
if ((opflags & ISBGRND) == 0)
|
||||||
clnt_pcreateerror("NFS Portmap");
|
clnt_pcreateerror("NFS Portmap");
|
||||||
} else {
|
} else {
|
||||||
saddr.sin_port = 0;
|
saddr.sin_port = 0;
|
||||||
pertry.tv_sec = 10;
|
pertry.tv_sec = 10;
|
||||||
pertry.tv_usec = 0;
|
pertry.tv_usec = 0;
|
||||||
if ((clp = clntudp_create(&saddr, RPCPROG_MNT,
|
if ((clp = (nfsargsp->sotype == SOCK_STREAM ?
|
||||||
RPCMNT_VER1, pertry, &so)) == NULL) {
|
clnttcp_create(&saddr, RPCPROG_MNT, RPCMNT_VER1,
|
||||||
|
&so, 0, 0) :
|
||||||
|
clntudp_create(&saddr, RPCPROG_MNT, RPCMNT_VER1,
|
||||||
|
pertry, &so))) == NULL) {
|
||||||
if ((opflags & ISBGRND) == 0)
|
if ((opflags & ISBGRND) == 0)
|
||||||
clnt_pcreateerror("Cannot MNT RPC");
|
clnt_pcreateerror("Cannot MNT RPC");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user