diff options
author | J. Bruce Fields <bfields@redhat.com> | 2019-06-05 12:42:05 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2019-07-03 20:54:03 -0400 |
commit | 791234448d4798f589110c17d2baaf1bbcc56cb8 (patch) | |
tree | ec3385bef711d86168e70e4ef192a3af6071ff18 /fs/nfsd/nfs4xdr.c | |
parent | 6f4859b8a72638f60c7051247aac63a761f01933 (diff) |
nfsd: decode implementation id
Decode the implementation ID and display in nfsd/clients/#/info. It may
be help identify the client. It won't be used otherwise.
(When this went into the protocol, I thought the implementation ID would
be a slippery slope towards implementation-specific workarounds as with
the http user-agent. But I guess I was wrong, the risk seems pretty low
now.)
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 548a5a843b67..442811809f3d 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -1389,7 +1389,6 @@ nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp, | |||
1389 | goto xdr_error; | 1389 | goto xdr_error; |
1390 | } | 1390 | } |
1391 | 1391 | ||
1392 | /* Ignore Implementation ID */ | ||
1393 | READ_BUF(4); /* nfs_impl_id4 array length */ | 1392 | READ_BUF(4); /* nfs_impl_id4 array length */ |
1394 | dummy = be32_to_cpup(p++); | 1393 | dummy = be32_to_cpup(p++); |
1395 | 1394 | ||
@@ -1397,21 +1396,19 @@ nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp, | |||
1397 | goto xdr_error; | 1396 | goto xdr_error; |
1398 | 1397 | ||
1399 | if (dummy == 1) { | 1398 | if (dummy == 1) { |
1400 | /* nii_domain */ | 1399 | status = nfsd4_decode_opaque(argp, &exid->nii_domain); |
1401 | READ_BUF(4); | 1400 | if (status) |
1402 | dummy = be32_to_cpup(p++); | 1401 | goto xdr_error; |
1403 | READ_BUF(dummy); | ||
1404 | p += XDR_QUADLEN(dummy); | ||
1405 | 1402 | ||
1406 | /* nii_name */ | 1403 | /* nii_name */ |
1407 | READ_BUF(4); | 1404 | status = nfsd4_decode_opaque(argp, &exid->nii_name); |
1408 | dummy = be32_to_cpup(p++); | 1405 | if (status) |
1409 | READ_BUF(dummy); | 1406 | goto xdr_error; |
1410 | p += XDR_QUADLEN(dummy); | ||
1411 | 1407 | ||
1412 | /* nii_date */ | 1408 | /* nii_date */ |
1413 | READ_BUF(12); | 1409 | status = nfsd4_decode_time(argp, &exid->nii_time); |
1414 | p += 3; | 1410 | if (status) |
1411 | goto xdr_error; | ||
1415 | } | 1412 | } |
1416 | DECODE_TAIL; | 1413 | DECODE_TAIL; |
1417 | } | 1414 | } |