Re: [PATCH] ksmbd: Fix to handle removal of rfc1002 header from smb_hdr

ChenXiaoSong
2025-12-18T16:49:45Z

Hi Namjae,

It seems David is correct, the `LENGTH` field is described in RFC1002
section 4.3.1: https://www.rfc-editor.org/rfc/rfc1002#section-4.3.1

The LENGTH field is the number of bytes following the LENGTH
field. In other words, LENGTH is the combined size of the
TRAILER field(s).

Thanks,
ChenXiaoSong.

On 12/19/25 12:01 AM, David Howells wrote:
> ChenXiaoSong <chenxiaosong.chenxiaosong@linux.dev> wrote:
>
> Actually, should SMB2_MIN_SUPPORTED_HEADER_SIZE include the +4 at all?
> pdu_size is the length stored in the RFC1002 header, which does not include
> itself.
>
> David
>