Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 872ece86 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFS: Fix a problem with the legacy binary mount code



Apparently, am-utils is still using the legacy binary mountdata interface,
and is having trouble parsing /proc/mounts due to the 'port=' field being
incorrectly set.

The following patch should fix up the regression.

Reported-by: default avatarMarius Tolzmann <tolzmann@molgen.mpg.de>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
parent c3f52af3
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1867,6 +1867,7 @@ static int nfs23_validate_mount_data(void *options,


		memcpy(sap, &data->addr, sizeof(data->addr));
		memcpy(sap, &data->addr, sizeof(data->addr));
		args->nfs_server.addrlen = sizeof(data->addr);
		args->nfs_server.addrlen = sizeof(data->addr);
		args->nfs_server.port = ntohs(data->addr.sin_port);
		if (!nfs_verify_server_address(sap))
		if (!nfs_verify_server_address(sap))
			goto out_no_address;
			goto out_no_address;


@@ -2564,6 +2565,7 @@ static int nfs4_validate_mount_data(void *options,
			return -EFAULT;
			return -EFAULT;
		if (!nfs_verify_server_address(sap))
		if (!nfs_verify_server_address(sap))
			goto out_no_address;
			goto out_no_address;
		args->nfs_server.port = ntohs(((struct sockaddr_in *)sap)->sin_port);


		if (data->auth_flavourlen) {
		if (data->auth_flavourlen) {
			if (data->auth_flavourlen > 1)
			if (data->auth_flavourlen > 1)