The lease epoch should not be incremented by the server from the value sent by the client in the request if a lease was not granted ie lease_level=NONE. From MS-SMB2 3.3.5.9.11 "Handling the SMB2_CREATE_REQUEST_LEASE_V2 Create Context": If the object store succeeds this request, Lease.LeaseState MUST be set to the new caching state. The server MUST increment Lease.Epoch by 1. Have patch, need bugnumber.
This bug was referenced in samba master: ca0363e5a7f53cde4ae7223c36f21c2ae12318f9 9f45eae2928bd2cb46fc827a348531acb471a549
Created attachment 18757 [details] Patch for 4.22 and 4.23 cherry-picked from master
Pushed to autobuild-v4-{23,22}-test.
This bug was referenced in samba v4-23-test: 1757b5ae5ae96bb9b5fb444aa2efe0d752e940f4 6d2cf012b41cddc53df63b1ca80a8b378c0bfadb
This bug was referenced in samba v4-22-test: 966700ae2be12fd7048e1865f5ac69887f7dc223 a5d457827fafcdc39f295937536601f482686e90
Closing out bug report. Thanks!
This bug was referenced in samba v4-22-stable (Release samba-4.22.6): 966700ae2be12fd7048e1865f5ac69887f7dc223 a5d457827fafcdc39f295937536601f482686e90
This bug was referenced in samba v4-23-stable (Release samba-4.23.3): 1757b5ae5ae96bb9b5fb444aa2efe0d752e940f4 6d2cf012b41cddc53df63b1ca80a8b378c0bfadb