64c563
diff -up nfs-utils-1.3.0/utils/mount/stropts.c.orig nfs-utils-1.3.0/utils/mount/stropts.c
64c563
--- nfs-utils-1.3.0/utils/mount/stropts.c.orig	2014-03-25 11:12:07.000000000 -0400
64c563
+++ nfs-utils-1.3.0/utils/mount/stropts.c	2016-04-28 11:18:25.876793000 -0400
64c563
@@ -352,13 +352,26 @@ static int nfs_validate_options(struct n
64c563
 	if (!nfs_nfs_proto_family(mi->options, &family))
64c563
 		return 0;
64c563
 
64c563
-	hint.ai_family = (int)family;
64c563
-	error = getaddrinfo(mi->hostname, NULL, &hint, &mi->address);
64c563
-	if (error != 0) {
64c563
-		nfs_error(_("%s: Failed to resolve server %s: %s"),
64c563
-			progname, mi->hostname, gai_strerror(error));
64c563
-		mi->address = NULL;
64c563
-		return 0;
64c563
+	/*
64c563
+	 * A remount is not going to be able to change the server's address,
64c563
+	 * nor should we try to resolve another address for the server as we
64c563
+	 * may end up with a different address.
64c563
+	 */
64c563
+	if (mi->flags & MS_REMOUNT) {
64c563
+		po_remove_all(mi->options, "addr");
64c563
+	} else {
64c563
+		hint.ai_family = (int)family;
64c563
+		error = getaddrinfo(mi->hostname, NULL, &hint, &mi->address);
64c563
+		if (error != 0) {
64c563
+			nfs_error(_("%s: Failed to resolve server %s: %s"),
64c563
+				progname, mi->hostname, gai_strerror(error));
64c563
+			mi->address = NULL;
64c563
+			return 0;
64c563
+		}
64c563
+
64c563
+		if (!nfs_append_addr_option(mi->address->ai_addr,
64c563
+						mi->address->ai_addrlen, mi->options))
64c563
+			return 0;
64c563
 	}
64c563
 
64c563
 	if (!nfs_set_version(mi))
64c563
@@ -367,10 +380,6 @@ static int nfs_validate_options(struct n
64c563
 	if (!nfs_append_sloppy_option(mi->options))
64c563
 		return 0;
64c563
 
64c563
-	if (!nfs_append_addr_option(mi->address->ai_addr,
64c563
-					mi->address->ai_addrlen, mi->options))
64c563
-		return 0;
64c563
-
64c563
 	return 1;
64c563
 }
64c563