diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-05-16 06:28:01 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-05-16 06:28:01 +0000 |
commit | 5076f461851ced6373e93a0ea407163d0b883c77 (patch) | |
tree | 2c0d4593f930ad913f894bf1c67bfce73c8fa746 | |
parent | 7d02fd55adc7fb13e33595dc4931b1e4944beb99 (diff) |
call pmap_getport() with correct proto; tron
-rw-r--r-- | sbin/mount_nfs/mount_nfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c index 9f648aa4c32..1d703312ecd 100644 --- a/sbin/mount_nfs/mount_nfs.c +++ b/sbin/mount_nfs/mount_nfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_nfs.c,v 1.14 1997/11/11 18:36:38 deraadt Exp $ */ +/* $OpenBSD: mount_nfs.c,v 1.15 1998/05/16 06:28:00 deraadt Exp $ */ /* $NetBSD: mount_nfs.c,v 1.12.4.1 1996/05/25 22:48:05 fvdl Exp $ */ /* @@ -650,7 +650,8 @@ tryagain: saddr.sin_family = AF_INET; saddr.sin_port = htons(PMAPPORT); if ((tport = port_no ? port_no : pmap_getport(&saddr, - RPCPROG_NFS, nfsvers, nfsproto)) == 0) { + RPCPROG_NFS, nfsvers, nfsargsp->sotype == SOCK_STREAM ? + IPPROTO_TCP : IPPROTO_UDP)) == 0) { if ((opflags & ISBGRND) == 0) clnt_pcreateerror("NFS Portmap"); } else { |