diff options
author | Andy Adamson <andros@netapp.com> | 2011-01-25 10:38:01 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-01-25 15:26:51 -0500 |
commit | 778be232a207e79088ba70d832ac25dfea6fbf1a (patch) | |
tree | 307249459e5ef45c4b3651c7fc5c454cdb3e0c92 /fs/nfs/client.c | |
parent | 80c30e8de4f81851b1f712bcc596e11d53bc76f1 (diff) |
NFS do not find client in NFSv4 pg_authenticate
The information required to find the nfs_client cooresponding to the incoming
back channel request is contained in the NFS layer. Perform minimal checking
in the RPC layer pg_authenticate method, and push more detailed checking into
the NFS layer where the nfs_client can be found.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r-- | fs/nfs/client.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 192f2f860265..bd3ca32879e7 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -1206,16 +1206,11 @@ nfs4_find_client_ident(int cb_ident) | |||
1206 | * For CB_COMPOUND calls, find a client by IP address, protocol version, | 1206 | * For CB_COMPOUND calls, find a client by IP address, protocol version, |
1207 | * minorversion, and sessionID | 1207 | * minorversion, and sessionID |
1208 | * | 1208 | * |
1209 | * CREATE_SESSION triggers a CB_NULL ping from servers. The callback service | ||
1210 | * sessionid can only be set after the CREATE_SESSION return, so a CB_NULL | ||
1211 | * can arrive before the callback sessionid is set. For CB_NULL calls, | ||
1212 | * find a client by IP address protocol version, and minorversion. | ||
1213 | * | ||
1214 | * Returns NULL if no such client | 1209 | * Returns NULL if no such client |
1215 | */ | 1210 | */ |
1216 | struct nfs_client * | 1211 | struct nfs_client * |
1217 | nfs4_find_client_sessionid(const struct sockaddr *addr, | 1212 | nfs4_find_client_sessionid(const struct sockaddr *addr, |
1218 | struct nfs4_sessionid *sid, int is_cb_compound) | 1213 | struct nfs4_sessionid *sid) |
1219 | { | 1214 | { |
1220 | struct nfs_client *clp; | 1215 | struct nfs_client *clp; |
1221 | 1216 | ||
@@ -1227,9 +1222,9 @@ nfs4_find_client_sessionid(const struct sockaddr *addr, | |||
1227 | if (!nfs4_has_session(clp)) | 1222 | if (!nfs4_has_session(clp)) |
1228 | continue; | 1223 | continue; |
1229 | 1224 | ||
1230 | /* Match sessionid unless cb_null call*/ | 1225 | /* Match sessionid*/ |
1231 | if (is_cb_compound && (memcmp(clp->cl_session->sess_id.data, | 1226 | if (memcmp(clp->cl_session->sess_id.data, |
1232 | sid->data, NFS4_MAX_SESSIONID_LEN) != 0)) | 1227 | sid->data, NFS4_MAX_SESSIONID_LEN) != 0) |
1233 | continue; | 1228 | continue; |
1234 | 1229 | ||
1235 | atomic_inc(&clp->cl_count); | 1230 | atomic_inc(&clp->cl_count); |
@@ -1244,7 +1239,7 @@ nfs4_find_client_sessionid(const struct sockaddr *addr, | |||
1244 | 1239 | ||
1245 | struct nfs_client * | 1240 | struct nfs_client * |
1246 | nfs4_find_client_sessionid(const struct sockaddr *addr, | 1241 | nfs4_find_client_sessionid(const struct sockaddr *addr, |
1247 | struct nfs4_sessionid *sid, int is_cb_compound) | 1242 | struct nfs4_sessionid *sid) |
1248 | { | 1243 | { |
1249 | return NULL; | 1244 | return NULL; |
1250 | } | 1245 | } |