]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: A TCP port is uint16, fix variable type
authorVolker Lendecke <vl@samba.org>
Mon, 15 Dec 2025 12:25:46 +0000 (13:25 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 7 Jan 2026 09:57:40 +0000 (09:57 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/smbd/smb2_negprot.c

index af899e20808c7c7927c6a5e761ef1d099817a02d..82ca120c2cd2d6b93bf454ef077e2f4a0901ddec 100644 (file)
@@ -433,14 +433,15 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
        max_limit = 0x10000;
 
        if (protocol >= PROTOCOL_SMB2_10) {
-               int p = 0;
+               uint16_t port = 0;
 
                if (tsocket_address_is_inet(req->sconn->local_address, "ip")) {
-                       p = tsocket_address_inet_port(req->sconn->local_address);
+                       port = tsocket_address_inet_port(
+                               req->sconn->local_address);
                }
 
                /* largeMTU is not supported over NBT (tcp port 139) */
-               if (p != NBT_SMB_PORT) {
+               if (port != NBT_SMB_PORT) {
                        capabilities |= SMB2_CAP_LARGE_MTU;
                        xconn->smb2.credits.multicredit = true;