more ...
authorStefan Metzmacher <metze@samba.org>
Wed, 28 Sep 2016 12:25:18 +0000 (14:25 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 1 Jun 2018 12:35:05 +0000 (14:35 +0200)
libcli/smb/smbXcli_base.c
libcli/smb/smb_direct.c
libcli/smb/smb_transport.c
libcli/smb/smb_transport_direct.c
source3/libsmb/smbsock_connect.c

index 3ebbc1b27fd77f59098e32f8c8388f4e85b0a527..359c8af28d933048b926289a5c1ee083a8223668 100644 (file)
@@ -316,8 +316,8 @@ static int smbXcli_conn_destructor(struct smbXcli_conn *conn)
        return 0;
 }
 
-int smb_direct_transport_fd = -1;
-const struct smb_transport *smb_direct_transport_ptr;
+//int smb_direct_transport_fd = -1;
+//const struct smb_transport *smb_direct_transport_ptr;
 
 struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx,
                                         int fd,
@@ -439,20 +439,20 @@ struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx,
        conn->smb2.cc_chunk_len = 1024 * 1024;
        conn->smb2.cc_max_chunks = 16;
 
-       if (fd == smb_direct_transport_fd) {
-               void *ptr = (void *)(uintptr_t)fd;
-               conn->transport = discard_const_p(struct smb_transport, smb_direct_transport_ptr);
-               smb_direct_transport_ptr = NULL;
-               smb_direct_transport_fd = -1;
-
-       DEBUG(0,("%s: %s: conn->transport [%p] ptr [%p] sock [%d]\n",
-                __location__, __func__, conn->transport, ptr, fd));
-
-       talloc_get_type_abort(conn->transport, struct smb_transport);
-       talloc_steal(conn, conn->transport);
-       conn->sock_fd = -1;
-       } else {
-       smb_panic(__location__);
+//     if (fd == smb_direct_transport_fd) {
+//             void *ptr = (void *)(uintptr_t)fd;
+//             conn->transport = discard_const_p(struct smb_transport, smb_direct_transport_ptr);
+//             smb_direct_transport_ptr = NULL;
+//             smb_direct_transport_fd = -1;
+//
+//     DEBUG(0,("%s: %s: conn->transport [%p] ptr [%p] sock [%d]\n",
+//              __location__, __func__, conn->transport, ptr, fd));
+//
+//     talloc_get_type_abort(conn->transport, struct smb_transport);
+//     talloc_steal(conn, conn->transport);
+//     conn->sock_fd = -1;
+//     } else {
+//     smb_panic(__location__);
        conn->sock_fd = fd;
        status = smb_transport_tcp_existing(conn, fd,
                                            max_pdu_size,
@@ -460,7 +460,7 @@ struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx,
        if (!NT_STATUS_IS_OK(status)) {
                goto error;
        }
-       }
+       //}
 
        talloc_set_destructor(conn, smbXcli_conn_destructor);
        return conn;
index ddd650cc816a2c22395ff7ccd47982abc99424fe..ce51679fdcd00ec4561aa25d096d20e4480ead68 100644 (file)
@@ -97,6 +97,8 @@ struct smb_direct_connection {
        } s2r;
 };
 
+struct smb_direct_connection *smb_direct_conn;
+
 #define SMB_DIRECT_IO_MAX_DATA 8192
 
 struct smb_direct_io {
@@ -197,7 +199,7 @@ struct smb_direct_connection *smb_direct_connection_create(TALLOC_CTX *mem_ctx)
        struct smb_direct_connection *c;
        int sfd[2];
        int ret;
-       uint16_t i;
+       //uint16_t i;
 
        c = talloc_zero(mem_ctx, struct smb_direct_connection);
        if (c == NULL) {
@@ -205,27 +207,31 @@ struct smb_direct_connection *smb_direct_connection_create(TALLOC_CTX *mem_ctx)
        }
        c->sock.fd = -1;
        c->sock.tmp_fd = -1;
-
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        talloc_set_destructor(c, smb_direct_connection_destructor);
 
        c->state.max_send_size       = 1364;
        c->state.max_receive_size    = SMB_DIRECT_IO_MAX_DATA;
        c->state.max_fragmented_size = 1048576;
        c->state.max_read_write_size = 0;
-       c->state.receive_credit_max  = 16;
+       c->state.receive_credit_max  = 2;
        c->state.send_credit_target  = 255;
        c->state.keep_alive_internal = 5;
 
-       ret = socketpair(AF_UNIX, 0, SOCK_STREAM, sfd);
+       ret = socketpair(AF_UNIX, SOCK_STREAM, 0, sfd);
        if (ret == -1) {
                int saved_errno = errno;
                TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
                errno = saved_errno;
                return NULL;
        }
        c->sock.tmp_fd = sfd[0];
        c->sock.fd = sfd[1];
 
+DEBUG(0,("%s:%s: sock.fd[%d] sock.tmp_fd[%d]\n",
+       __location__, __func__, c->sock.fd, c->sock.tmp_fd));
+
        smb_set_close_on_exec(c->sock.tmp_fd);
        smb_set_close_on_exec(c->sock.fd);
        set_blocking(c->sock.fd, false);
@@ -233,6 +239,7 @@ struct smb_direct_connection *smb_direct_connection_create(TALLOC_CTX *mem_ctx)
        c->rdma.cm_channel = rdma_create_event_channel();
        if (c->rdma.cm_channel == NULL) {
                TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
                return NULL;
        }
        smb_set_close_on_exec(c->rdma.cm_channel->fd);
@@ -250,18 +257,31 @@ struct smb_direct_connection *smb_direct_connection_create(TALLOC_CTX *mem_ctx)
 #endif
        if (ret != 0) {
                TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
                return NULL;
        }
 
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+       return c;
+}
+
+static struct smb_direct_connection *smb_direct_connection_complete_alloc(struct smb_direct_connection *c)
+{
+       int ret;
+       uint16_t i;
+
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        c->ibv.pd = ibv_alloc_pd(c->rdma.cm_id->verbs);
        if (c->ibv.pd == NULL) {
                TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
                return NULL;
        }
 
        c->ibv.comp_channel = ibv_create_comp_channel(c->rdma.cm_id->verbs);
        if (c->ibv.comp_channel == NULL) {
                TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
                return NULL;
        }
        smb_set_close_on_exec(c->ibv.comp_channel->fd);
@@ -279,6 +299,7 @@ struct smb_direct_connection *smb_direct_connection_create(TALLOC_CTX *mem_ctx)
                                       c, c->ibv.comp_channel, 0);
        if (c->ibv.send_cq == NULL) {
                TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
                return NULL;
        }
        c->ibv.init_attr.send_cq = c->ibv.send_cq;
@@ -288,6 +309,7 @@ struct smb_direct_connection *smb_direct_connection_create(TALLOC_CTX *mem_ctx)
                                       c, c->ibv.comp_channel, 0);
        if (c->ibv.recv_cq == NULL) {
                TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
                return NULL;
        }
        c->ibv.init_attr.recv_cq = c->ibv.recv_cq;
@@ -295,18 +317,21 @@ struct smb_direct_connection *smb_direct_connection_create(TALLOC_CTX *mem_ctx)
        ret = ibv_req_notify_cq(c->ibv.send_cq, 0);
        if (ret != 0) {
                TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
                return NULL;
        }
 
        ret = ibv_req_notify_cq(c->ibv.recv_cq, 0);
        if (ret != 0) {
                TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
                return NULL;
        }
 
        ret = rdma_create_qp(c->rdma.cm_id, c->ibv.pd, &c->ibv.init_attr);
        if (ret != 0) {
                TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
                return NULL;
        }
        c->ibv.qp = c->rdma.cm_id->qp;
@@ -314,6 +339,7 @@ struct smb_direct_connection *smb_direct_connection_create(TALLOC_CTX *mem_ctx)
        c->io_mem_ctx = talloc_named_const(c, 0, "io_mem_ctx");
        if (c->io_mem_ctx == NULL) {
                TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
                return NULL;
        }
 
@@ -321,6 +347,11 @@ struct smb_direct_connection *smb_direct_connection_create(TALLOC_CTX *mem_ctx)
                struct smb_direct_io *io;
 
                io = smb_direct_io_create(c);
+               if (io == NULL) {
+                       TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+                       return NULL;
+               }
                DLIST_ADD_END(c->r2s.idle, io);
        }
 
@@ -328,9 +359,15 @@ struct smb_direct_connection *smb_direct_connection_create(TALLOC_CTX *mem_ctx)
                struct smb_direct_io *io;
 
                io = smb_direct_io_create(c);
+               if (io == NULL) {
+                       TALLOC_FREE(c);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+                       return NULL;
+               }
                DLIST_ADD_END(c->s2r.idle, io);
        }
 
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        return c;
 }
 
@@ -404,6 +441,7 @@ static int smb_direct_connection_post_recv(struct smb_direct_connection *c)
        struct ibv_recv_wr *bad_recv_wr = NULL;
        int ret;
 
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        if (c->r2s.idle == NULL) {
                return 0;
        }
@@ -430,6 +468,7 @@ static int smb_direct_connection_post_recv(struct smb_direct_connection *c)
        DLIST_CONCATENATE(c->r2s.posted, c->r2s.idle);
        c->r2s.idle = NULL;
 
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        return 0;
 }
 
@@ -581,6 +620,7 @@ static struct tevent_req *smb_direct_connection_rdma_connect_send(TALLOC_CTX *me
        }
        state->c = c;
 
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        talloc_set_destructor(state, smb_direct_connection_rdma_connect_state_destructor);
 
        c->rdma.fde_channel = tevent_add_fd(ev, c,
@@ -669,6 +709,14 @@ static void smb_direct_connection_rdma_connect_handler(struct tevent_context *ev
        case RDMA_CM_EVENT_ROUTE_RESOLVED:
        errno = 0;
        ret = 0;
+               c = smb_direct_connection_complete_alloc(c);
+               if (c == NULL) {
+                       status = map_nt_error_from_unix_common(errno);
+                       DEBUG(0,("%s:%s: ret[%d] errno[%d] status[%s]\n",
+                               __location__, __FUNCTION__, ret, errno, nt_errstr(status)));
+                       tevent_req_nterror(req, status);
+                       return;
+               }
 #if 0
                c->ibv.pd = ibv_alloc_pd(c->rdma.cm_id->verbs);
                if (c->ibv.pd == NULL) {
@@ -820,6 +868,7 @@ static void smb_direct_connection_rdma_connect_handler(struct tevent_context *ev
 
 static NTSTATUS smb_direct_connection_rdma_connect_recv(struct tevent_req *req)
 {
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        return tevent_req_simple_recv_ntstatus(req);
 }
 
@@ -891,6 +940,7 @@ static struct tevent_req *smb_direct_connection_negotiate_connect_send(TALLOC_CT
        }
        state->c = c;
 
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        // TODO: cleanup
        talloc_set_destructor(state, smb_direct_connection_negotiate_connect_destructor);
 
@@ -1286,6 +1336,7 @@ static void smb_direct_connection_negotiate_connect_ibv_handler(struct tevent_co
 
 static NTSTATUS smb_direct_connection_negotiate_connect_recv(struct tevent_req *req)
 {
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        return tevent_req_simple_recv_ntstatus(req);
 }
 
@@ -1315,6 +1366,7 @@ struct tevent_req *smb_direct_connection_connect_send(TALLOC_CTX *mem_ctx,
        state->ev = ev;
        state->c = c;
 
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        subreq = smb_direct_connection_rdma_connect_send(state, ev, c, src, dst, NULL, NULL);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -1323,6 +1375,7 @@ struct tevent_req *smb_direct_connection_connect_send(TALLOC_CTX *mem_ctx,
                                smb_direct_connection_connect_done_rdma,
                                req);
 
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        return req;
 }
 
@@ -1336,12 +1389,14 @@ static void smb_direct_connection_connect_done_rdma(struct tevent_req *subreq)
                struct smb_direct_connection_connect_state);
        NTSTATUS status;
 
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        status = smb_direct_connection_rdma_connect_recv(subreq);
        TALLOC_FREE(subreq);
        if (tevent_req_nterror(req, status)) {
                return;
        }
 
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        subreq = smb_direct_connection_negotiate_connect_send(state, state->ev, state->c);
        if (tevent_req_nomem(subreq, req)) {
                return;
@@ -1349,6 +1404,7 @@ static void smb_direct_connection_connect_done_rdma(struct tevent_req *subreq)
        tevent_req_set_callback(subreq,
                                smb_direct_connection_connect_done_negotiate,
                                req);
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
 }
 
 static void smb_direct_connection_connect_done_negotiate(struct tevent_req *subreq)
@@ -1358,12 +1414,14 @@ static void smb_direct_connection_connect_done_negotiate(struct tevent_req *subr
                struct tevent_req);
        NTSTATUS status;
 
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        status = smb_direct_connection_negotiate_connect_recv(subreq);
        TALLOC_FREE(subreq);
        if (tevent_req_nterror(req, status)) {
                return;
        }
 
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
        tevent_req_done(req);
 }
 
@@ -1378,10 +1436,13 @@ NTSTATUS smb_direct_connection_connect_recv(struct tevent_req *req, int *fd)
        *fd = -1;
 
        if (tevent_req_is_nterror(req, &status)) {
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
                tevent_req_received(req);
                return status;
        }
 
+DEBUG(0,("%s:%s: sock.fd[%d] sock.tmp_fd[%d]\n",
+       __location__, __func__, c->sock.fd, c->sock.tmp_fd));
        *fd = c->sock.tmp_fd;
        c->sock.tmp_fd = -1;
        tevent_req_received(req);
index 436eb312c96e248769240ea40ae151326c7b6c58..8282ead6aa7e98f901f5e2f6b0c4f0b41a4b88d6 100644 (file)
 #include <tevent.h>
 #include "../util/tevent_ntstatus.h"
 #include "libcli/smb/smb_transport.h"
+#include "libcli/smb/smb_direct.h"
+
+extern struct smb_direct_connection *smb_direct_conn;
 
 struct smb_transport {
        const char *location;
        const struct smb_transport_ops *ops;
        void *private_data;
 
+       struct smb_direct_connection *smb_direct;
+
        struct tevent_req *write_pdu_req;
        struct tevent_req *read_pdu_req;
 };
@@ -68,6 +73,8 @@ struct smb_transport *_smb_transport_create(TALLOC_CTX *mem_ctx,
        transport->location     = location;
        transport->ops          = ops;
 
+       transport->smb_direct = smb_direct_conn;
+
        state = talloc_zero_size(transport, psize);
        if (state == NULL) {
                talloc_free(transport);
@@ -120,6 +127,14 @@ struct tevent_req *smb_transport_write_pdu_send(TALLOC_CTX *mem_ctx,
        state->ops = transport->ops;
        state->transport = transport;
 
+       if (transport->smb_direct != NULL) {
+               NTSTATUS status;
+               status = smb_direct_connection_setup_events(transport->smb_direct, ev);
+               if (tevent_req_nterror(req, status)) {
+                       return tevent_req_post(req, ev);
+               }
+       }
+
        /* first check if the input is ok */
 #ifdef IOV_MAX
        if (count > IOV_MAX) {
@@ -236,6 +251,14 @@ struct tevent_req *smb_transport_read_pdu_send(TALLOC_CTX *mem_ctx,
 
        talloc_set_destructor(state, smb_transport_read_pdu_destructor);
 
+       if (transport->smb_direct != NULL) {
+               NTSTATUS status;
+               status = smb_direct_connection_setup_events(transport->smb_direct, ev);
+               if (tevent_req_nterror(req, status)) {
+                       return tevent_req_post(req, ev);
+               }
+       }
+
        subreq = state->ops->read_pdu_send(state, ev, transport);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
index 3481a3d027aec104c4b4a5efc5ae90a7a493208d..2624ea0bb66d67c9a7118d1ce95a6709fc7f1570 100644 (file)
@@ -32,6 +32,9 @@
 #include <infiniband/verbs.h>
 
 struct smb_transport_direct {
+       struct smb_direct_connection *c;
+       struct smb_transport *t;
+
        struct {
                struct rdma_cm_id *cm_id;
                struct rdma_event_channel *cm_channel;
index e4b4311043de2fef7617d9fdee6dc2f8572a67aa..355de507206fc6475b804afc7f2f55fcce456073 100644 (file)
@@ -25,6 +25,7 @@
 #include "async_smb.h"
 #include "../libcli/smb/read_smb.h"
 #include "../libcli/smb/smb_transport.h"
+#include "libcli/smb/smb_direct.h"
 #include "libsmb/nmblib.h"
 
 struct cli_session_request_state {
@@ -338,7 +339,8 @@ struct smbsock_connect_state {
        struct tevent_req *req_139;
        struct tevent_req *req_445;
        struct tevent_req *req_5445;
-       struct smb_transport *smb_direct;
+       //struct smb_transport *smb_direct;
+       struct smb_direct_connection *smb_direct;
        int sock;
        uint16_t port;
 };
@@ -347,7 +349,7 @@ static void smbsock_connect_cleanup(struct tevent_req *req,
                                    enum tevent_req_state req_state);
 static void smbsock_connect_connected(struct tevent_req *subreq);
 static void smbsock_connect_do_139(struct tevent_req *subreq);
-static void smbsock_connect_do_5445(struct tevent_req *subreq);
+//static void smbsock_connect_do_5445(struct tevent_req *subreq);
 
 struct tevent_req *smbsock_connect_send(TALLOC_CTX *mem_ctx,
                                        struct tevent_context *ev,
@@ -360,7 +362,6 @@ struct tevent_req *smbsock_connect_send(TALLOC_CTX *mem_ctx,
 {
        struct tevent_req *req;
        struct smbsock_connect_state *state;
-       NTSTATUS status;
 
        req = tevent_req_create(mem_ctx, &state, struct smbsock_connect_state);
        if (req == NULL) {
@@ -408,16 +409,38 @@ struct tevent_req *smbsock_connect_send(TALLOC_CTX *mem_ctx,
         * port==0, try both
         */
 
-       status = smb_transport_direct_create(state, &state->smb_direct);
-       if (tevent_req_nterror(req, status)) {
+//struct smb_direct_connection *smb_direct_connection_create(TALLOC_CTX *mem_ctx);
+//
+//struct tevent_req *smb_direct_connection_connect_send(TALLOC_CTX *mem_ctx,
+//                                                   struct tevent_context *ev,
+//                                                   struct smb_direct_connection *c,
+//                                                   const struct sockaddr_storage *src,
+//                                                   const struct sockaddr_storage *dst);
+//NTSTATUS smb_direct_connection_connect_recv(struct tevent_req *req, int *fd);
+//
+//NTSTATUS smb_direct_connection_setup_events(struct smb_direct_connection *c,
+//                                         struct tevent_context *ev);
+       //status = smb_transport_direct_create(state, &state->smb_direct);
+       //if (tevent_req_nterror(req, status)) {
+       //      return tevent_req_post(req, ev);
+       //}
+       //state->req_5445 = smb_transport_direct_connect_rdma_send(state, ev, state->smb_direct,
+       //                                             addr, NULL, NULL);
+       //if (tevent_req_nomem(state->req_5445, req)) {
+       //      return tevent_req_post(req, ev);
+       //}
+       //tevent_req_set_callback(state->req_5445, smbsock_connect_do_5445,
+       //                      req);
+       state->smb_direct = smb_direct_connection_create(state);
+       if (tevent_req_nomem(state->smb_direct, req)) {
                return tevent_req_post(req, ev);
        }
-       state->req_5445 = smb_transport_direct_connect_rdma_send(state, ev, state->smb_direct,
-                                                      addr, NULL, NULL);
+       state->req_5445 = smb_direct_connection_connect_send(state, ev, state->smb_direct,
+                                                            NULL, addr);
        if (tevent_req_nomem(state->req_5445, req)) {
                return tevent_req_post(req, ev);
        }
-       tevent_req_set_callback(state->req_5445, smbsock_connect_do_5445,
+       tevent_req_set_callback(state->req_5445, smbsock_connect_connected,
                                req);
 
        if (0) {
@@ -497,32 +520,9 @@ static void smbsock_connect_do_139(struct tevent_req *subreq)
                                req);
 }
 
-static void smbsock_connect_do_5445(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct smbsock_connect_state *state = tevent_req_data(
-               req, struct smbsock_connect_state);
-       NTSTATUS status;
-
-       status = smb_transport_direct_connect_rdma_recv(subreq);
-       TALLOC_FREE(subreq);
-       if (tevent_req_nterror(req, status)) {
-               return;
-       }
-
-       state->req_5445 = smb_transport_direct_connect_negotiate_send(state,
-                                       state->ev,
-                                       state->smb_direct);
-       if (tevent_req_nomem(state->req_5445, req)) {
-               return;
-       }
-       tevent_req_set_callback(state->req_5445, smbsock_connect_connected,
-                               req);
-}
-
-extern int smb_direct_transport_fd;
-extern const struct smb_transport *smb_direct_transport_ptr;
+//extern int smb_direct_transport_fd;
+//extern const struct smb_transport *smb_direct_transport_ptr;
+extern struct smb_direct_connection *smb_direct_conn;
 
 static void smbsock_connect_connected(struct tevent_req *subreq)
 {
@@ -534,15 +534,16 @@ static void smbsock_connect_connected(struct tevent_req *subreq)
 
        if (subreq == state->req_5445) {
 
-               status = smb_transport_direct_connect_negotiate_recv(subreq);
+               //status = smb_transport_direct_connect_negotiate_recv(subreq);
+               status = smb_direct_connection_connect_recv(subreq, &state->sock);
                TALLOC_FREE(state->req_5445);
-               talloc_steal(NULL, state->smb_direct);
-               state->sock = (intptr_t)state->smb_direct;
+               smb_direct_conn = talloc_steal(NULL, state->smb_direct);
+               //state->sock = (intptr_t)state->smb_direct;
                state->port = 5445;
 
-               SMB_ASSERT(smb_direct_transport_fd == -1);
-               smb_direct_transport_fd = state->sock;
-               smb_direct_transport_ptr = state->smb_direct;
+               //SMB_ASSERT(smb_direct_transport_fd == -1);
+               //smb_direct_transport_fd = state->sock;
+               //smb_direct_transport_ptr = state->smb_direct;
 
                DEBUG(0,("%s: %s: smbdirect [%p:%s] sock [%d] port [%d]\n",
                         __location__, __func__, state->smb_direct, talloc_get_name(state->smb_direct), state->sock, state->port));