s3:smbd: for now ignore all non NBT Session Message requests for SMB2
authorStefan Metzmacher <metze@samba.org>
Mon, 8 Jun 2009 11:15:00 +0000 (13:15 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 9 Jun 2009 17:51:01 +0000 (19:51 +0200)
metze

source3/smbd/smb2_server.c

index 42e230785c8cfa043fab4f2a890341e568bd70f2..dee06b37aff94ad1f947ce72f9417d8e6d4f45b6 100644 (file)
@@ -1107,6 +1107,14 @@ static void smbd_smb2_request_incoming(struct tevent_req *subreq)
                return;
        }
 
+       if (req->in.nbt_hdr[0] != 0x00) {
+               DEBUG(1,("smbd_smb2_request_incoming: ignore NBT[0x%02X] msg\n",
+                        req->in.nbt_hdr[0]));
+               talloc_free(req->mem_pool);
+               req = NULL;
+               goto next;
+       }
+
        /* TODO: validate the incoming request */
        req->current_idx = 1;
 
@@ -1125,6 +1133,7 @@ static void smbd_smb2_request_incoming(struct tevent_req *subreq)
                return;
        }
 
+next:
        /* ask for the next request (this constructs the main loop) */
        subreq = smbd_smb2_request_read_send(conn,conn->smb2.event_ctx, conn);
        if (subreq == NULL) {