linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libexport.a: fix using bad index for loop at cltsetup()
@ 2011-06-14  2:16 Mi Jinlong
  2011-06-14  2:54 ` Mi Jinlong
  2011-06-22 22:35 ` Steve Dickson
  0 siblings, 2 replies; 3+ messages in thread
From: Mi Jinlong @ 2011-06-14  2:16 UTC (permalink / raw)
  To: Steve Dickson; +Cc: NFS

At cltsetup(), for address checking, it should use clp's naddr for index, 
not cltarg's naddr(and it's always zero here).

Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
---
 support/export/nfsctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/support/export/nfsctl.c b/support/export/nfsctl.c
index f89c644..2950a90 100644
--- a/support/export/nfsctl.c
+++ b/support/export/nfsctl.c
@@ -78,7 +78,7 @@ cltsetup(struct nfsctl_client *cltarg, nfs_client *clp)
 	str_tolower(cltarg->cl_ident);
 
 	j = 0;
-	for (i = 0; i < cltarg->cl_naddr && i < NFSCLNT_ADDRMAX; i++) {
+	for (i = 0; i < clp->m_naddr && i < NFSCLNT_ADDRMAX; i++) {
 		const struct sockaddr_in *sin = get_addrlist_in(clp, i);
 		if (sin->sin_family == AF_INET)
 			cltarg->cl_addrlist[j++] = sin->sin_addr;
-- 
1.7.5.4



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

end of thread, other threads:[~2011-06-22 22:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14  2:16 [PATCH] libexport.a: fix using bad index for loop at cltsetup() Mi Jinlong
2011-06-14  2:54 ` Mi Jinlong
2011-06-22 22:35 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).