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)
committerStefan Metzmacher <metze@samba.org>
Thu, 28 Jun 2012 22:14:53 +0000 (00:14 +0200)
Otherwise we'll never consume sequence id '0'.

metze

source3/smbd/smb2_server.c

index 6f45194e391bc86edf553399ab2328180371c641..77c687039935f85b02c653cc7e1eaaf6a4bb4bd8 100644 (file)
@@ -364,13 +364,13 @@ static bool smb2_validate_message_id(struct smbd_server_connection *sconn,
                }
                bitmap_set(credits_bm, bitmap_offset);
 
-               if (i == sconn->smb2.seqnum_low + 1) {
+               if (i == 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;