In cltsetup(), when checking the address, use clp's naddr for index,
instead of cltarg's naddr, which it's always zero there.
Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
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;