summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-06-25 21:40:00 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-29 00:14:56 +0200
commit5b7f5d02b5a432fff116f5e2a17e956e3255cd35 (patch)
treeaf1d00d910defd9272a3d5a71cd9f38a2d7f5f87 /source3/smbd
parent1db83d2b376fc409a51c28dd7a30717819b366a6 (diff)
downloadsamba-5b7f5d02b5a432fff116f5e2a17e956e3255cd35.tar.gz
samba-5b7f5d02b5a432fff116f5e2a17e956e3255cd35.tar.bz2
samba-5b7f5d02b5a432fff116f5e2a17e956e3255cd35.zip
s3:smb2_negprot: support SMB2_CAP_LARGE_MTU on everything but port 139
In future we'll have other transports like RDMA. This makes NBT (tcp port 139) special instead of port 445. metze
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/smb2_negprot.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c
index d3a709b159..c084114ac5 100644
--- a/source3/smbd/smb2_negprot.c
+++ b/source3/smbd/smb2_negprot.c
@@ -261,15 +261,18 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
max_limit = 0x10000;
if (protocol >= PROTOCOL_SMB2_10) {
- /* largeMTU is only available on port 445 */
- if (TCP_SMB_PORT ==
- tsocket_address_inet_port(req->sconn->local_address))
- {
+ int p = 0;
+ if (tsocket_address_is_inet(req->sconn->local_address, "ip")) {
+ p = tsocket_address_inet_port(req->sconn->local_address);
+ }
+
+ /* largeMTU is not supported over NBT (tcp port 139) */
+ if (p != NBT_SMB_PORT) {
capabilities |= SMB2_CAP_LARGE_MTU;
req->sconn->smb2.supports_multicredit = true;
- /* SMB2.1 has 1 MB of allowed size */
+ /* SMB >= 2.1 has 1 MB of allowed size */
max_limit = 0x100000; /* 1MB */
}
}