Linux NFS development
 help / color / mirror / Atom feed
* [PATCH 1/6] mount: Fix a bug in the legacy version of nfs_name_to_address()
@ 2009-02-27 20:05 Chuck Lever
       [not found] ` <20090227200511.11301.33720.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Chuck Lever @ 2009-02-27 20:05 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

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 */


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-03-04 23:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 20:05 [PATCH 1/6] mount: Fix a bug in the legacy version of nfs_name_to_address() Chuck Lever
     [not found] ` <20090227200511.11301.33720.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2009-02-27 20:05   ` [PATCH 2/6] nfs(5): document new [no]resvport option Chuck Lever
2009-02-27 20:05   ` [PATCH 3/6] " Chuck Lever
2009-02-27 20:05   ` [PATCH 4/6] showmount command: remove legacy RPC logic Chuck Lever
2009-02-27 20:05   ` [PATCH 5/6] nfs-utils: Remove fprintf() call from support/nfs/getport.c Chuck Lever
2009-02-27 20:05   ` [PATCH 6/6] configure: fix AC_CACHE_VAL warnings on Fedora 10 Chuck Lever
2009-03-04 22:59   ` [PATCH 1/6] mount: Fix a bug in the legacy version of nfs_name_to_address() Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox