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

Commit ecc2b88c authored by Kinglong Mee's avatar Kinglong Mee Committed by Trond Myklebust
Browse files

nfs/blocklayout: Make sure calculate signature length aligned



Avoid a bad nfs server return an unaligned length of signature.

Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 11487ddb
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -89,7 +89,8 @@ nfs4_block_decode_volume(struct xdr_stream *xdr, struct pnfs_block_volume *b)
			memcpy(&b->simple.sigs[i].sig, p,
			memcpy(&b->simple.sigs[i].sig, p,
				b->simple.sigs[i].sig_len);
				b->simple.sigs[i].sig_len);


			b->simple.len += 8 + 4 + b->simple.sigs[i].sig_len;
			b->simple.len += 8 + 4 + \
				(XDR_QUADLEN(b->simple.sigs[i].sig_len) << 2);
		}
		}
		break;
		break;
	case PNFS_BLOCK_VOLUME_SLICE:
	case PNFS_BLOCK_VOLUME_SLICE: