linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mi Jinlong <mijinlong@cn.fujitsu.com>
To: Steve Dickson <SteveD@redhat.com>
Cc: NFS <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] libexport.a: fix using bad index for loop at cltsetup()
Date: Tue, 14 Jun 2011 10:54:30 +0800	[thread overview]
Message-ID: <4DF6CD66.80408@cn.fujitsu.com> (raw)
In-Reply-To: <4DF6C46C.9030201@cn.fujitsu.com>



Mi Jinlong 写道:
> At cltsetup(), for address checking, it should use clp's naddr for index, 
> not cltarg's naddr(and it's always zero here).

  After sending this patch, I find this problem was introduced by 6299a.

-- 
----
thanks
Mi Jinlong

> 
> 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;


  reply	other threads:[~2011-06-14  2:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-06-22 22:35 ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DF6CD66.80408@cn.fujitsu.com \
    --to=mijinlong@cn.fujitsu.com \
    --cc=SteveD@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).