The branch, master has been updated
       via  8c09dacdcdd s3:smb2_negprot: make use of xconn->transport.type != 
SMB_TRANSPORT_TYPE_NBT
      from  90c806d3083 s3:utils:status_json fix Non-boolean returned

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8c09dacdcdd094d0701a92f31900b202d502cbfb
Author: Stefan Metzmacher <[email protected]>
Date:   Fri Dec 19 19:35:27 2025 +0100

    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 <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>
    
    Autobuild-User(master): Volker Lendecke <[email protected]>
    Autobuild-Date(master): Fri Jan 16 12:48:19 UTC 2026 on atb-devel-224

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/smb2_negprot.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)


Changeset truncated at 500 lines:

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;
 


-- 
Samba Shared Repository

Reply via email to