diff options
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 9de89df961f4..9e4067999209 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -714,7 +714,7 @@ __be32 | |||
714 | nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | 714 | nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, |
715 | struct nfsd4_setclientid *setclid) | 715 | struct nfsd4_setclientid *setclid) |
716 | { | 716 | { |
717 | __be32 ip_addr = rqstp->rq_addr.sin_addr.s_addr; | 717 | struct sockaddr_in *sin = svc_addr_in(rqstp); |
718 | struct xdr_netobj clname = { | 718 | struct xdr_netobj clname = { |
719 | .len = setclid->se_namelen, | 719 | .len = setclid->se_namelen, |
720 | .data = setclid->se_name, | 720 | .data = setclid->se_name, |
@@ -749,7 +749,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
749 | */ | 749 | */ |
750 | status = nfserr_clid_inuse; | 750 | status = nfserr_clid_inuse; |
751 | if (!cmp_creds(&conf->cl_cred, &rqstp->rq_cred) | 751 | if (!cmp_creds(&conf->cl_cred, &rqstp->rq_cred) |
752 | || conf->cl_addr != ip_addr) { | 752 | || conf->cl_addr != sin->sin_addr.s_addr) { |
753 | printk("NFSD: setclientid: string in use by client" | 753 | printk("NFSD: setclientid: string in use by client" |
754 | "(clientid %08x/%08x)\n", | 754 | "(clientid %08x/%08x)\n", |
755 | conf->cl_clientid.cl_boot, conf->cl_clientid.cl_id); | 755 | 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, | |||
769 | if (new == NULL) | 769 | if (new == NULL) |
770 | goto out; | 770 | goto out; |
771 | copy_verf(new, &clverifier); | 771 | copy_verf(new, &clverifier); |
772 | new->cl_addr = ip_addr; | 772 | new->cl_addr = sin->sin_addr.s_addr; |
773 | copy_cred(&new->cl_cred,&rqstp->rq_cred); | 773 | copy_cred(&new->cl_cred,&rqstp->rq_cred); |
774 | gen_clid(new); | 774 | gen_clid(new); |
775 | gen_confirm(new); | 775 | gen_confirm(new); |
@@ -801,7 +801,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
801 | if (new == NULL) | 801 | if (new == NULL) |
802 | goto out; | 802 | goto out; |
803 | copy_verf(new,&conf->cl_verifier); | 803 | copy_verf(new,&conf->cl_verifier); |
804 | new->cl_addr = ip_addr; | 804 | new->cl_addr = sin->sin_addr.s_addr; |
805 | copy_cred(&new->cl_cred,&rqstp->rq_cred); | 805 | copy_cred(&new->cl_cred,&rqstp->rq_cred); |
806 | copy_clid(new, conf); | 806 | copy_clid(new, conf); |
807 | gen_confirm(new); | 807 | gen_confirm(new); |
@@ -820,7 +820,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
820 | if (new == NULL) | 820 | if (new == NULL) |
821 | goto out; | 821 | goto out; |
822 | copy_verf(new,&clverifier); | 822 | copy_verf(new,&clverifier); |
823 | new->cl_addr = ip_addr; | 823 | new->cl_addr = sin->sin_addr.s_addr; |
824 | copy_cred(&new->cl_cred,&rqstp->rq_cred); | 824 | copy_cred(&new->cl_cred,&rqstp->rq_cred); |
825 | gen_clid(new); | 825 | gen_clid(new); |
826 | gen_confirm(new); | 826 | gen_confirm(new); |
@@ -847,7 +847,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
847 | if (new == NULL) | 847 | if (new == NULL) |
848 | goto out; | 848 | goto out; |
849 | copy_verf(new,&clverifier); | 849 | copy_verf(new,&clverifier); |
850 | new->cl_addr = ip_addr; | 850 | new->cl_addr = sin->sin_addr.s_addr; |
851 | copy_cred(&new->cl_cred,&rqstp->rq_cred); | 851 | copy_cred(&new->cl_cred,&rqstp->rq_cred); |
852 | gen_clid(new); | 852 | gen_clid(new); |
853 | gen_confirm(new); | 853 | gen_confirm(new); |
@@ -881,7 +881,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, | |||
881 | struct nfsd4_compound_state *cstate, | 881 | struct nfsd4_compound_state *cstate, |
882 | struct nfsd4_setclientid_confirm *setclientid_confirm) | 882 | struct nfsd4_setclientid_confirm *setclientid_confirm) |
883 | { | 883 | { |
884 | __be32 ip_addr = rqstp->rq_addr.sin_addr.s_addr; | 884 | struct sockaddr_in *sin = svc_addr_in(rqstp); |
885 | struct nfs4_client *conf, *unconf; | 885 | struct nfs4_client *conf, *unconf; |
886 | nfs4_verifier confirm = setclientid_confirm->sc_confirm; | 886 | nfs4_verifier confirm = setclientid_confirm->sc_confirm; |
887 | clientid_t * clid = &setclientid_confirm->sc_clientid; | 887 | clientid_t * clid = &setclientid_confirm->sc_clientid; |
@@ -900,9 +900,9 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, | |||
900 | unconf = find_unconfirmed_client(clid); | 900 | unconf = find_unconfirmed_client(clid); |
901 | 901 | ||
902 | status = nfserr_clid_inuse; | 902 | status = nfserr_clid_inuse; |
903 | if (conf && conf->cl_addr != ip_addr) | 903 | if (conf && conf->cl_addr != sin->sin_addr.s_addr) |
904 | goto out; | 904 | goto out; |
905 | if (unconf && unconf->cl_addr != ip_addr) | 905 | if (unconf && unconf->cl_addr != sin->sin_addr.s_addr) |
906 | goto out; | 906 | goto out; |
907 | 907 | ||
908 | if ((conf && unconf) && | 908 | if ((conf && unconf) && |