Skip to content

Remove the rfc1002 length from all SMB2 requests

Ronnie Sahlberg linux-cifs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 1 patch 3 repliesIn review

Patches in v1 No applies recorded yet

The patch the cover letter announces is not in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] Remove the rfc1002 length from all SMB2 requests

Steve, All,

Do not merge yet. It is still WIP but I want some review.

I have been looking at compounding, but before we can do that easily we need to break the layering violation that happens between the RFC1002 SM Length field and the SMB2 PDUs.

This patch removes the 4 byte RFC1002 length header from all SMB2 request structures and at the same time also gets rid of a lot of the magic +4 / -4 tweaking that was used all over the code to cope with that the structures were actually bigger than they should be. It also gets rid of a lot of magic "tweak the first four bytes" as the dynamic parts of the SMB2 pdus are constructed.

Additionally we have a new SendReceive3() function that computes and attaches the rfc1002 length from scratch, based on the input kiov containing the smb2 pdu and data.

This will simplify later for compounding when we will use the SMB2_*() functions to create multiple SMB2 pdus that will all be wrapped inside one single rfc1002 header.

It would be nice to do the similar split of the nbss and smb2 layers for all the reply structures as well but that can go in a different patch.