|
@@ -714,7 +714,7 @@ __be32
|
|
nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
|
nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
|
struct nfsd4_setclientid *setclid)
|
|
struct nfsd4_setclientid *setclid)
|
|
{
|
|
{
|
|
- __be32 ip_addr = rqstp->rq_addr.sin_addr.s_addr;
|
|
|
|
|
|
+ struct sockaddr_in *sin = svc_addr_in(rqstp);
|
|
struct xdr_netobj clname = {
|
|
struct xdr_netobj clname = {
|
|
.len = setclid->se_namelen,
|
|
.len = setclid->se_namelen,
|
|
.data = setclid->se_name,
|
|
.data = setclid->se_name,
|
|
@@ -749,7 +749,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
|
*/
|
|
*/
|
|
status = nfserr_clid_inuse;
|
|
status = nfserr_clid_inuse;
|
|
if (!cmp_creds(&conf->cl_cred, &rqstp->rq_cred)
|
|
if (!cmp_creds(&conf->cl_cred, &rqstp->rq_cred)
|
|
- || conf->cl_addr != ip_addr) {
|
|
|
|
|
|
+ || conf->cl_addr != sin->sin_addr.s_addr) {
|
|
printk("NFSD: setclientid: string in use by client"
|
|
printk("NFSD: setclientid: string in use by client"
|
|
"(clientid %08x/%08x)\n",
|
|
"(clientid %08x/%08x)\n",
|
|
conf->cl_clientid.cl_boot, conf->cl_clientid.cl_id);
|
|
conf->cl_clientid.cl_boot, conf->cl_clientid.cl_id);
|
|
@@ -769,7 +769,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
|
if (new == NULL)
|
|
if (new == NULL)
|
|
goto out;
|
|
goto out;
|
|
copy_verf(new, &clverifier);
|
|
copy_verf(new, &clverifier);
|
|
- new->cl_addr = ip_addr;
|
|
|
|
|
|
+ new->cl_addr = sin->sin_addr.s_addr;
|
|
copy_cred(&new->cl_cred,&rqstp->rq_cred);
|
|
copy_cred(&new->cl_cred,&rqstp->rq_cred);
|
|
gen_clid(new);
|
|
gen_clid(new);
|
|
gen_confirm(new);
|
|
gen_confirm(new);
|
|
@@ -801,7 +801,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
|
if (new == NULL)
|
|
if (new == NULL)
|
|
goto out;
|
|
goto out;
|
|
copy_verf(new,&conf->cl_verifier);
|
|
copy_verf(new,&conf->cl_verifier);
|
|
- new->cl_addr = ip_addr;
|
|
|
|
|
|
+ new->cl_addr = sin->sin_addr.s_addr;
|
|
copy_cred(&new->cl_cred,&rqstp->rq_cred);
|
|
copy_cred(&new->cl_cred,&rqstp->rq_cred);
|
|
copy_clid(new, conf);
|
|
copy_clid(new, conf);
|
|
gen_confirm(new);
|
|
gen_confirm(new);
|
|
@@ -820,7 +820,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
|
if (new == NULL)
|
|
if (new == NULL)
|
|
goto out;
|
|
goto out;
|
|
copy_verf(new,&clverifier);
|
|
copy_verf(new,&clverifier);
|
|
- new->cl_addr = ip_addr;
|
|
|
|
|
|
+ new->cl_addr = sin->sin_addr.s_addr;
|
|
copy_cred(&new->cl_cred,&rqstp->rq_cred);
|
|
copy_cred(&new->cl_cred,&rqstp->rq_cred);
|
|
gen_clid(new);
|
|
gen_clid(new);
|
|
gen_confirm(new);
|
|
gen_confirm(new);
|
|
@@ -847,7 +847,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
|
if (new == NULL)
|
|
if (new == NULL)
|
|
goto out;
|
|
goto out;
|
|
copy_verf(new,&clverifier);
|
|
copy_verf(new,&clverifier);
|
|
- new->cl_addr = ip_addr;
|
|
|
|
|
|
+ new->cl_addr = sin->sin_addr.s_addr;
|
|
copy_cred(&new->cl_cred,&rqstp->rq_cred);
|
|
copy_cred(&new->cl_cred,&rqstp->rq_cred);
|
|
gen_clid(new);
|
|
gen_clid(new);
|
|
gen_confirm(new);
|
|
gen_confirm(new);
|
|
@@ -881,7 +881,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
|
|
struct nfsd4_compound_state *cstate,
|
|
struct nfsd4_compound_state *cstate,
|
|
struct nfsd4_setclientid_confirm *setclientid_confirm)
|
|
struct nfsd4_setclientid_confirm *setclientid_confirm)
|
|
{
|
|
{
|
|
- __be32 ip_addr = rqstp->rq_addr.sin_addr.s_addr;
|
|
|
|
|
|
+ struct sockaddr_in *sin = svc_addr_in(rqstp);
|
|
struct nfs4_client *conf, *unconf;
|
|
struct nfs4_client *conf, *unconf;
|
|
nfs4_verifier confirm = setclientid_confirm->sc_confirm;
|
|
nfs4_verifier confirm = setclientid_confirm->sc_confirm;
|
|
clientid_t * clid = &setclientid_confirm->sc_clientid;
|
|
clientid_t * clid = &setclientid_confirm->sc_clientid;
|
|
@@ -900,9 +900,9 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
|
|
unconf = find_unconfirmed_client(clid);
|
|
unconf = find_unconfirmed_client(clid);
|
|
|
|
|
|
status = nfserr_clid_inuse;
|
|
status = nfserr_clid_inuse;
|
|
- if (conf && conf->cl_addr != ip_addr)
|
|
|
|
|
|
+ if (conf && conf->cl_addr != sin->sin_addr.s_addr)
|
|
goto out;
|
|
goto out;
|
|
- if (unconf && unconf->cl_addr != ip_addr)
|
|
|
|
|
|
+ if (unconf && unconf->cl_addr != sin->sin_addr.s_addr)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
if ((conf && unconf) &&
|
|
if ((conf && unconf) &&
|