From 39686072d5539003f8a2e2679311c5057ee82041 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 14 Aug 2004 18:24:33 +0000 Subject: r1824: nicer handling of NBT session replies, and handling of bad packets with the async SMB code (This used to be commit cef94978f43a8326b6cf1888c15ca8c568ebe9f8) --- source4/libcli/raw/clitransport.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/libcli/raw/clitransport.c') diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index 784a6f1798..03a0540be0 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -353,6 +353,12 @@ static void smbcli_transport_finish_recv(struct smbcli_transport *transport) req->in.size = len; req->in.allocated = req->in.size; + /* handle NBT session replies */ + if (req->in.buffer[0] != 0) { + req->status = NT_STATUS_OK; + goto async; + } + /* handle non-SMB replies */ if (req->in.size < NBT_HDR_SIZE + MIN_SMB_SIZE) { req->state = SMBCLI_REQUEST_ERROR; -- cgit