Compartilhar via


2.2.23.2 Lease Break Notification

The SMB2 Lease Break Notification packet is sent by the server when the underlying object store indicates that a lease is being broken, representing a change in the lease state. This notification is not valid for the SMB 2.0.2 dialect. This message is composed of an SMB2 header, as specified in section 2.2.1, followed by this notification structure:


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

StructureSize

NewEpoch

Flags

LeaseKey

...

...

...

CurrentLeaseState

NewLeaseState

BreakReason

AccessMaskHint

ShareMaskHint

StructureSize (2 bytes): The server MUST set this to 44, indicating the size of the response structure, not including the header.

NewEpoch (2 bytes): A 16-bit unsigned integer indicating a lease state change by the server. This field is only valid for a server implementing the SMB 3.x dialect family.

For the SMB 2.1 dialect, this field MUST NOT be used and MUST be reserved. The server MUST set this to 0, and the client MUST ignore it on receipt.

Flags (4 bytes): The field MUST be constructed by using zero or more of the following values.

Value

Meaning

SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED

0x01

A Lease Break Acknowledgment is required.

LeaseKey (16 bytes): The client-generated key that identifies the owner of the lease.

CurrentLeaseState (4 bytes): The current lease state of the open. This field MUST be constructed using the following values.

Value

Meaning

SMB2_LEASE_READ_CACHING

0x01

A read caching lease is granted.

SMB2_LEASE_HANDLE_CACHING

0x02

A handle caching lease is granted.

SMB2_LEASE_WRITE_CACHING

0x04

A write caching lease is granted.

NewLeaseState (4 bytes): The new lease state for the open. This field MUST be constructed using the SMB2_LEASE_NONE or above values.

BreakReason (4 bytes): This field MUST NOT be used and MUST be reserved. The server MUST set this to 0, and the client MUST ignore it on receipt.

AccessMaskHint (4 bytes): This field MUST NOT be used and MUST be reserved. The server MUST set this to 0, and the client MUST ignore it on receipt.

ShareMaskHint (4 bytes): This field MUST NOT be used and MUST be reserved. The server MUST set this to 0, and the client MUST ignore it on receipt.