Commit 54ec3d46 authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Trond Myklebust

gss_krb5: Don't expect blocksize to always be 8 when calculating padding

Signed-off-by: default avatarSteve Dickson <steved@redhat.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 7561042f
No related merge requests found
......@@ -12,10 +12,7 @@
static inline int
gss_krb5_padding(int blocksize, int length)
{
/* Most of the code is block-size independent but currently we
* use only 8: */
BUG_ON(blocksize != 8);
return 8 - (length & 7);
return blocksize - (length % blocksize);
}
static inline void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment