mirror of
https://github.com/torvalds/linux.git
synced 2024-10-30 16:51:45 +00:00
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: Marius Tolzmann <tolzmann@molgen.mpg.de> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@vger.kernel.org
This commit is contained in:
parent
c3f52af3e0
commit
872ece86ea
@ -1867,6 +1867,7 @@ static int nfs23_validate_mount_data(void *options,
|
||||
|
||||
memcpy(sap, &data->addr, 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))
|
||||
goto out_no_address;
|
||||
|
||||
@ -2564,6 +2565,7 @@ static int nfs4_validate_mount_data(void *options,
|
||||
return -EFAULT;
|
||||
if (!nfs_verify_server_address(sap))
|
||||
goto out_no_address;
|
||||
args->nfs_server.port = ntohs(((struct sockaddr_in *)sap)->sin_port);
|
||||
|
||||
if (data->auth_flavourlen) {
|
||||
if (data->auth_flavourlen > 1)
|
||||
|
Loading…
Reference in New Issue
Block a user