From: Stefan Metzmacher Date: Fri, 19 Dec 2025 18:35:27 +0000 (+0100) Subject: s3:smb2_negprot: make use of xconn->transport.type != SMB_TRANSPORT_TYPE_NBT X-Git-Tag: tdb-1.4.15~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c09dacdcdd094d0701a92f31900b202d502cbfb;p=thirdparty%2Fsamba.git s3:smb2_negprot: make use of xconn->transport.type != SMB_TRANSPORT_TYPE_NBT This is better than relying on the magic port 139. Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Fri Jan 16 12:48:19 UTC 2026 on atb-devel-224 --- diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c index 82ca120c2cd..1c3f35c7113 100644 --- a/source3/smbd/smb2_negprot.c +++ b/source3/smbd/smb2_negprot.c @@ -433,15 +433,8 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req) max_limit = 0x10000; if (protocol >= PROTOCOL_SMB2_10) { - uint16_t port = 0; - - if (tsocket_address_is_inet(req->sconn->local_address, "ip")) { - port = tsocket_address_inet_port( - req->sconn->local_address); - } - /* largeMTU is not supported over NBT (tcp port 139) */ - if (port != NBT_SMB_PORT) { + if (xconn->transport.type != SMB_TRANSPORT_TYPE_NBT) { capabilities |= SMB2_CAP_LARGE_MTU; xconn->smb2.credits.multicredit = true;