xdr: another sanity check for operation count in reply
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
9dcf4021ba
commit
7d9b32cd78
1 changed files with 7 additions and 0 deletions
|
|
@ -3132,6 +3132,13 @@ bool_t nfs_decode_compound(
|
||||||
eprintf("reply with %u operations, only sent %u!\n",
|
eprintf("reply with %u operations, only sent %u!\n",
|
||||||
res->resarray_count, expected_count);
|
res->resarray_count, expected_count);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
} else if (res->resarray_count < expected_count &&
|
||||||
|
res->status == NFS4_OK) {
|
||||||
|
/* illegal for a server to reply with less operations,
|
||||||
|
* unless one of them fails */
|
||||||
|
eprintf("successful reply with only %u operations, sent %u!\n",
|
||||||
|
res->resarray_count, expected_count);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < res->resarray_count; i++)
|
for (i = 0; i < res->resarray_count; i++)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue