]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smb2_server: clear sequence window if we got the lowest sequence id
authorStefan Metzmacher <metze@samba.org>
Tue, 26 Jun 2012 06:08:37 +0000 (08:08 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 24 Jul 2012 18:50:09 +0000 (20:50 +0200)
Otherwise we'll never consume sequence id '0'.

metze
(similar to commit d6e7a76461ad7582efa510676aa2bea230ea9f02)

source3/smbd/smb2_server.c

index 5cb31b3f5c4dd2f1cefde7fe5cb14547058f5953..de4b93abc374318a117c44693f41ba6fbe6e5a1c 100644 (file)
@@ -343,13 +343,13 @@ static bool smb2_validate_message_id(struct smbd_server_connection *sconn,
        }
        bitmap_set(credits_bm, bitmap_offset);
 
-       if (message_id == sconn->smb2.seqnum_low + 1) {
+       if (message_id == sconn->smb2.seqnum_low) {
                /* Move the window forward by all the message_id's
                   already seen. */
                while (bitmap_query(credits_bm, bitmap_offset)) {
                        DEBUG(10,("smb2_validate_message_id: clearing "
                                "id %llu (position %u) from bitmap\n",
-                               (unsigned long long)(sconn->smb2.seqnum_low + 1),
+                               (unsigned long long)(sconn->smb2.seqnum_low),
                                bitmap_offset ));
                        bitmap_clear(credits_bm, bitmap_offset);
                        sconn->smb2.seqnum_low += 1;