[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-nfs
Subject:    [PATCH 1/6] mount: Fix a bug in the legacy version of
From:       Chuck Lever <chuck.lever () oracle ! com>
Date:       2009-02-27 20:05:11
Message-ID: 20090227200511.11301.33720.stgit () ingres ! 1015granger ! net
[Download RAW message or body]

The legacy version of nfs_name_to_address() returned an incorrect
value for the size of the returned address.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 utils/mount/network.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/utils/mount/network.c b/utils/mount/network.c
index 92f75b4..b41388e 100644
--- a/utils/mount/network.c
+++ b/utils/mount/network.c
@@ -291,7 +291,7 @@ int nfs_name_to_address(const char *hostname,
 	}
 
 	memcpy(&sin->sin_addr, hp->h_addr, hp->h_length);
-	*salen = hp->h_length;
+	*salen = sizeof(struct sockaddr_in);
 	return 1;
 }
 #endif	/* HAVE_DECL_AI_ADDRCONFIG */

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic