This is better than relying on the magic port 139.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jan 16 12:48:19 UTC 2026 on atb-devel-224
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;