Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7d7ca35 authored by J. Bruce Fields's avatar J. Bruce Fields
Browse files

nfsd4: fix off-by-one-error in SEQUENCE reply



The values here represent highest slotid numbers.  Since slotid's are
numbered starting from zero, the highest should be one less than the
number of slots.

Reported-by: default avatarRick Macklem <rmacklem@uoguelph.ca>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent c152292f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3221,9 +3221,9 @@ nfsd4_encode_sequence(struct nfsd4_compoundres *resp, int nfserr,
	WRITEMEM(seq->sessionid.data, NFS4_MAX_SESSIONID_LEN);
	WRITE32(seq->seqid);
	WRITE32(seq->slotid);
	WRITE32(seq->maxslots);
	/* For now: target_maxslots = maxslots */
	WRITE32(seq->maxslots);
	/* Note slotid's are numbered from zero: */
	WRITE32(seq->maxslots - 1); /* sr_highest_slotid */
	WRITE32(seq->maxslots - 1); /* sr_target_highest_slotid */
	WRITE32(seq->status_flags);

	ADJUST_ARGS();