[PATCH] smb3: minor debugging clarifications in rfc1001 len processing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I ran into some cases where the server was returning the wrong length
on frames but I couldn't easily match them to the command in the
network trace (or server logs) since I need the command and/or
multiplex id to find the offending SMB2/SMB3 command.  Add these
two fields to the log message.

Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
---
 fs/cifs/smb2misc.c | 7 +++++--
 fs/cifs/smb2ops.c  | 4 ++++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index db0453660ff6..9171720dc658 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -254,10 +254,13 @@ smb2_check_message(char *buf, unsigned int len,
struct TCP_Server_Info *srvr)
          */
         if (clc_len < len) {
             printk_once(KERN_WARNING
-                "SMB2 server sent bad RFC1001 len %d not %d\n",
-                len, clc_len);
+                 "srv rsp too long %d not %d for cmd:%d mid:%llu\n",
+                 len, clc_len, command, mid);
             return 0;
         }
+        printk_once(KERN_WARNING
+            "srv rsp too short, len %d not %d. cmd:%d mid:%llu\n",
+            len, clc_len, command, mid);

         return 1;
     }


-- 
Thanks,

Steve



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux