From nobody Fri May 10 19:58:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VbfpL55jlz5KKpQ; Fri, 10 May 2024 19:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VbfpL4ZP6z4RvZ; Fri, 10 May 2024 19:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715371130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pQlCd1hcyXXLmn4T+rP4G3ceicdTaeDDqjpWrBScZvM=; b=O262OvU//tPrIB4SWvY2kCa0kJXTudr8S+sk2l1cLvAC+4vivVYiitPTrymkfYjY1TZ6AB bLhNyQxvGaZlIWzd+rbUd31aHuwkv3pUk6ko9cglLM00Wi7OcCC7h2ho3L4NSDWAvWo3Sv sDm4Ibwol1vhVBxbhykOpSzfzKoXWYFXVTMhA0oP6TTxh5TOuj5PBXNfHHIY5PK85iXXlS jGPcpX0hzKtbQVLiGztd/iE1DWHCQe9Rc65I5o1nTi8aJ8ihinUFNT2n5X1CyF2Itrgb48 2BpM2F3P5JqDCr4qJmpRzVWcw9bBRwpdeQjDAln83dfTcniAf6Y0Otj9t4OqOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715371130; a=rsa-sha256; cv=none; b=FSr0aHUelbsYZ1Tet31Sppm9ozFNBVQCxYvRq76a/vU7kKJd6EMxgMEJgU9FVCi9sNqBb0 e0cFbbEFVjnrKlEwcFUxbKNYaT5qCuD3Os1uuAAvifdD90+uHnUqWw77gD7r6Iv7S69ck2 3CjB0ighau1JAD8uMcXZvbYT5PxgoeT72FQ7Gku0hcS/cLEwxwG7XN5+VrNYmWniJXqZs8 kaBFYkmB9S73WKe92u49g7lcGZjE4nUr7VdiOaKc7+SqCHZeXZKADqtovIDaOcOVrnvs8l Vt6y+zwVknsAXtkfhqSLxSDl678yOQxnp340Cuuxr/TnRr/dUeGFgQiv1W3fRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715371130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pQlCd1hcyXXLmn4T+rP4G3ceicdTaeDDqjpWrBScZvM=; b=I4Je5mv3buh9S3TmrmRp4WySV8iyfMd4EY0fuwYMbRC3DrbMBdIhO8LnnPbUKqXFkjfXIn DaHvW8tkcDvu3V6aqnLOxQOO9t4TozpHaNdpceRCRN2zd3mjZMYOnCHMqRDnaEs6f6YVb0 8Ez8FXSC8TXuE3jiKgi9HZAdAMxClNQRul+B7G5fiw7zH6s0afmIrE7zMuSocCeIFlbwE/ CeStWm8E4/3OaaCghQYLldsTbAc/C+z3Dl+DGb12+f3QmacetASfvvjuf+a/lhiCmhq4Ku Hmz1bj47EVsAKcLI8c7oUCljjNOP8yJNFUHz9lnoZAsv37FeuH4Rp6KkWdR8Ww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VbfpL42mLzqw9; Fri, 10 May 2024 19:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44AJwoig046412; Fri, 10 May 2024 19:58:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44AJwo1T046409; Fri, 10 May 2024 19:58:50 GMT (envelope-from git) Date: Fri, 10 May 2024 19:58:50 GMT Message-Id: <202405101958.44AJwo1T046409@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: b67716dd58b9 - main - sctp: store heartbeat creation time as time_t Reported by: Coverity Scan CID: 1493087 MFC after: 3 days List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b67716dd58b93f373523cf35373c56fcfad44b12 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b67716dd58b93f373523cf35373c56fcfad44b12 commit b67716dd58b93f373523cf35373c56fcfad44b12 Author: Michael Tuexen AuthorDate: 2024-05-10 18:40:15 +0000 Commit: Michael Tuexen CommitDate: 2024-05-10 18:40:15 +0000 sctp: store heartbeat creation time as time_t Reported by: Coverity Scan CID: 1493087 MFC after: 3 days --- sys/netinet/sctp_header.h | 2 +- sys/netinet/sctp_output.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/sctp_header.h b/sys/netinet/sctp_header.h index 9696c4e954ba..c9fd0341f83a 100644 --- a/sys/netinet/sctp_header.h +++ b/sys/netinet/sctp_header.h @@ -83,7 +83,7 @@ struct sctp_supported_addr_param { /* heartbeat info parameter */ struct sctp_heartbeat_info_param { struct sctp_paramhdr ph; - uint32_t time_value_1; + time_t time_value_1; uint32_t time_value_2; uint32_t random_value1; uint32_t random_value2; diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index c146bda95c7c..cc8d017aba16 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -11427,7 +11427,7 @@ sctp_send_hb(struct sctp_tcb *stcb, struct sctp_nets *net, int so_locked) /* Fill out hb parameter */ hb->heartbeat.hb_info.ph.param_type = htons(SCTP_HEARTBEAT_INFO); hb->heartbeat.hb_info.ph.param_length = htons(sizeof(struct sctp_heartbeat_info_param)); - hb->heartbeat.hb_info.time_value_1 = (uint32_t)now.tv_sec; + hb->heartbeat.hb_info.time_value_1 = now.tv_sec; hb->heartbeat.hb_info.time_value_2 = now.tv_usec; /* Did our user request this one, put it in */ hb->heartbeat.hb_info.addr_family = (uint8_t)net->ro._l_addr.sa.sa_family;