summaryrefslogtreecommitdiff
path: root/source4/libcli/smb2/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/smb2/transport.c')
-rw-r--r--source4/libcli/smb2/transport.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/libcli/smb2/transport.c b/source4/libcli/smb2/transport.c
index 9b0c1461fd9..e3b2954dd4c 100644
--- a/source4/libcli/smb2/transport.c
+++ b/source4/libcli/smb2/transport.c
@@ -55,6 +55,14 @@ struct smb2_transport *smb2_transport_init(struct smbcli_socket *sock,
transport->ev = sock->event.ctx;
transport->options = *options;
+ if (transport->options.max_protocol == PROTOCOL_DEFAULT) {
+ transport->options.max_protocol = PROTOCOL_LATEST;
+ }
+
+ if (transport->options.max_protocol < PROTOCOL_SMB2_02) {
+ transport->options.max_protocol = PROTOCOL_LATEST;
+ }
+
TALLOC_FREE(sock->event.fde);
TALLOC_FREE(sock->event.te);