]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/network.c
nfs(5): Document remount behavior
[nfs-utils.git] / utils / mount / network.c
index 1759c1cdbc732b341494ee0b7f56aea77bc63e36..21a7a2cc11fd8ed2faa5fa064c7a68bf5b5e3026 100644 (file)
@@ -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;
 }
 
 /*