X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=utils%2Fmount%2Fnetwork.c;h=21a7a2cc11fd8ed2faa5fa064c7a68bf5b5e3026;hb=f4968a724c1d4162a8e2b9f6a19c460cc56c95f7;hp=1759c1cdbc732b341494ee0b7f56aea77bc63e36;hpb=7e90281b88c05b01c61152b54a0cf2faec45b09c;p=nfs-utils.git diff --git a/utils/mount/network.c b/utils/mount/network.c index 1759c1c..21a7a2c 100644 --- a/utils/mount/network.c +++ b/utils/mount/network.c @@ -210,9 +210,6 @@ int nfs_lookup(const char *hostname, const sa_family_t family, { struct addrinfo *gai_results; struct addrinfo gai_hint = { -#ifdef HAVE_DECL_AI_ADDRCONFIG - .ai_flags = AI_ADDRCONFIG, -#endif /* HAVE_DECL_AI_ADDRCONFIG */ .ai_family = family, }; socklen_t len = *salen; @@ -1521,7 +1518,11 @@ nfs_mount_protocol(struct mount_options *options, unsigned long *protocol) * set @protocol to zero. The pmap protocol value will * be filled in later by an rpcbind query in this case. */ - return nfs_nfs_protocol(options, protocol); + if (!nfs_nfs_protocol(options, protocol)) + return 0; + if (*protocol == NFSPROTO_RDMA) + *protocol = IPPROTO_TCP; + return 1; } /*