All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 33/44] nfsd41: Remove ip address collision detection case per review comment
@ 2009-06-16  1:20 Benny Halevy
  2009-06-18 23:36 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Benny Halevy @ 2009-06-16  1:20 UTC (permalink / raw)
  To: bfields; +Cc: pnfs, linux-nfs

From: Mike Sager <sager@netapp.com>

Verified that cthon and pynfs exchange id tests pass (except for the
two expected fails: EID8 and EID50)

Signed-off-by: Mike Sager <sager@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfsd/nfs4state.c |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index c91b333..8ac5630 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1158,12 +1158,6 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
 			expire_client(conf);
 			goto out_new;
 		}
-		if (ip_addr != conf->cl_addr &&
-		    !(exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A)) {
-			/* Client collision. 18.35.4 case 3 */
-			status = nfserr_clid_inuse;
-			goto out;
-		}
 		/*
 		 * Set bit when the owner id and verifier map to an already
 		 * confirmed client id (18.35.3).
@@ -1177,12 +1171,12 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
 		copy_verf(conf, &verf);
 		new = conf;
 		goto out_copy;
-	} else {
-		/* 18.35.4 case 7 */
-		if (exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A) {
-			status = nfserr_noent;
-			goto out;
-		}
+	}
+
+	/* 18.35.4 case 7 */
+	if (exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A) {
+		status = nfserr_noent;
+		goto out;
 	}
 
 	unconf  = find_unconfirmed_client_by_str(dname, strhashval, true);
-- 
1.6.3


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

* Re: [PATCH 33/44] nfsd41: Remove ip address collision detection case per review comment
  2009-06-16  1:20 [PATCH 33/44] nfsd41: Remove ip address collision detection case per review comment Benny Halevy
@ 2009-06-18 23:36 ` J. Bruce Fields
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2009-06-18 23:36 UTC (permalink / raw)
  To: Benny Halevy; +Cc: pnfs, linux-nfs

On Tue, Jun 16, 2009 at 04:20:47AM +0300, Benny Halevy wrote:
> From: Mike Sager <sager@netapp.com>
> 
> Verified that cthon and pynfs exchange id tests pass (except for the
> two expected fails: EID8 and EID50)

Thanks, applied.  Though exchange_id still isn't right: for example,
we're expiring the client in the conf && !same_verf case without
checking the principal.

If someone could take an hour or two, go through the 18.35.4 *very*
carefully, and check all of this, it would be appreciated.

--b.

> 
> Signed-off-by: Mike Sager <sager@netapp.com>
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
> ---
>  fs/nfsd/nfs4state.c |   18 ++++++------------
>  1 files changed, 6 insertions(+), 12 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index c91b333..8ac5630 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -1158,12 +1158,6 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
>  			expire_client(conf);
>  			goto out_new;
>  		}
> -		if (ip_addr != conf->cl_addr &&
> -		    !(exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A)) {
> -			/* Client collision. 18.35.4 case 3 */
> -			status = nfserr_clid_inuse;
> -			goto out;
> -		}
>  		/*
>  		 * Set bit when the owner id and verifier map to an already
>  		 * confirmed client id (18.35.3).
> @@ -1177,12 +1171,12 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
>  		copy_verf(conf, &verf);
>  		new = conf;
>  		goto out_copy;
> -	} else {
> -		/* 18.35.4 case 7 */
> -		if (exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A) {
> -			status = nfserr_noent;
> -			goto out;
> -		}
> +	}
> +
> +	/* 18.35.4 case 7 */
> +	if (exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A) {
> +		status = nfserr_noent;
> +		goto out;
>  	}
>  
>  	unconf  = find_unconfirmed_client_by_str(dname, strhashval, true);
> -- 
> 1.6.3
> 

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

end of thread, other threads:[~2009-06-18 23:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-16  1:20 [PATCH 33/44] nfsd41: Remove ip address collision detection case per review comment Benny Halevy
2009-06-18 23:36 ` J. Bruce Fields

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.