diff options
| author | David Howells <dhowells@redhat.com> | 2025-09-05 15:34:15 +0100 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2025-12-05 17:09:32 -0600 |
| commit | 83bfbd0bb9025f98fa62b44f93bd67466773d1db (patch) | |
| tree | 44db10cd8cbc33981b63f953cf151e7053c593f4 /tools/lib/python | |
| parent | 9d85ac939d52e93d80efb01a299c6f0bedb30487 (diff) | |
cifs: Remove the RFC1002 header from smb_hdr
Remove the RFC1002 header from struct smb_hdr as used for SMB-1.0. This
simplifies the SMB-1.0 code by simplifying a lot of places that have to add
or subtract 4 to work around the fact that the RFC1002 header isn't really
part of the message and the base for various offsets within the message is
from the base of the smb_hdr, not the RFC1002 header.
Further, clean up a bunch of places that require an extra kvec struct
specifically pointing to the RFC1002 header, such that kvec[0].iov_base
must be exactly 4 bytes before kvec[1].iov_base.
This allows the header preamble size stuff to be removed too.
The size of the request and response message are then handed around either
directly or by summing the size of all the iov_len members in the kvec
array for which we have a count.
Also, this simplifies and cleans up the common transmission and receive
paths for SMB1 and SMB2/3 as there no longer needs to be special handling
casing for SMB1 messages as the RFC1002 header is now generated on the fly
for SMB1 as it is for SMB2/3.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Tom Talpey <tom@talpey.com>
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
cc: Shyam Prasad N <sprasad@microsoft.com>
cc: linux-cifs@vger.kernel.org
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
