]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: check if SMB2 PDU size has been padded and suppress the warning
authorRonnie Sahlberg <lsahlber@redhat.com>
Wed, 22 Aug 2018 02:19:24 +0000 (12:19 +1000)
committerSteve French <stfrench@microsoft.com>
Thu, 23 Aug 2018 20:10:46 +0000 (15:10 -0500)
commit192a1e97f79aa7bbfcfaa3869009326cccd2c74b
treed31ac49b712f9e4b350d7b369b0837a2bda8f926
parentd83e80c6d67ed009ca8eb91184b1f40193a9fd58
cifs: check if SMB2 PDU size has been padded and suppress the warning

Some SMB2/3 servers, Win2016 but possibly others too, adds padding
not only between PDUs in a compound but also to the final PDU.
This padding extends the PDU to a multiple of 8 bytes.

Check if the unexpected length looks like this might be the case
and avoid triggering the log messages for :

  "SMB2 server sent bad RFC1001 len %d not %d\n"

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2misc.c