From nobody Sat Aug 3 22:27:31 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 4Wby4g6Zrpz5RS3c; Sat, 03 Aug 2024 22:27:31 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wby4g62Tdz4GSY; Sat, 3 Aug 2024 22:27:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724051; 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=J6mxVyVv2yJx9zmkROf45fquch+pOAuTWOWlmQMm3os=; b=YpbV5mksarcrgSqOf0/d4c7ddiAYAOdRT4SjAnB/bFSgu40mNoCMqAvO4ALrLJOT8TYt4T SZb9ADEQcHVQ48uzPEq9GK2uoaZ2Oi4nlwz1CpyllFf2Rzx4yt+BUALvdZdKak3AmrHGMS 3bmoGhv3HO0Ene4ShpOlzuv4CupZafgrWyYMh/H1W5oJWDJfyHq9fuGOsDI1FuOcYl26MS WZ1yI4MjgWJ6q31374NgYdZDQO9e6ny5iM1eEcoyJZ/jrjCrIut5Drydw7Hov5xwBVi4nd fH285isVxOfXETtPYUIzJ08pDAgYAEV4sN6fwXqwYiAGXGQYVxIsh5T8fEKpYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722724051; a=rsa-sha256; cv=none; b=t/JfU2xHY/ckPXMNeypVdKTfw2q1nUy5S6dcbfhWKuXhC0hkP/UnXuP5EzDoZIXH273iBV UT25DRFQsVgXTkTA6Q30wxEbiafxURyYds+Qu2rn6+zIfuSrd90Zh1ywVzHgI8Ht2PPWnA 0p1fpT7lkL+MHokkevp7dSGKBKLxB0RhbRf35g49wP8oGcgoGXVqzgP4Lw8RDpOO2p6yIB 9RR7crNvwSOsE9MIZiPzvSKpxuGgQ3khsfQ1lJSmlqD4dqfzFgUmdwcBWHirO9Oq5Q5IKR g56nFaHnFQjMWRWxXWcOcB+YrQeINuE/1FsR/b4YNKV1ZiK3vVZgnIivh0w8xA== 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=1722724051; 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=J6mxVyVv2yJx9zmkROf45fquch+pOAuTWOWlmQMm3os=; b=XNpBlr8hZEYOSTEFAMB5vNf6zY52WguDJG4tdH+DYyCNtdIeKLxQsNemk5kp/MZMk9bBCd Q8Lxp0TxTTiXB/0OHqseWxHzup6zAHC3lfBG7Z3Sbffh4eELSM5S2D3KR6EK5stcvs28fv 390nmwhuvURfy4FOvhUKLanckaWUxAbuZbwEWI2q8udVRx00T23PVzMbzPPzPpPh4/xOcV MYVR45y/ZJ4eqTgLmSTCaxUFqF9l0GCWKAAnYICTRux89NdJcG7MC7tTMS2PKVKZmvLSiy rVRSJ1BMd+DLVTBSmzG4Pq7VRoZ+4fP3xzc9TtGMeMFCtY9GYT4HVC0uf1y8Lg== 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 4Wby4g5MZ9zVQM; Sat, 3 Aug 2024 22:27:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473MRViP026712; Sat, 3 Aug 2024 22:27:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MRVfu026709; Sat, 3 Aug 2024 22:27:31 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:27:31 GMT Message-Id: <202408032227.473MRVfu026709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: e1fb799d7d1a - stable/14 - sctp: store heartbeat creation time as time_t 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/stable/14 X-Git-Reftype: branch X-Git-Commit: e1fb799d7d1a9e5122c7f55e21ae271341a63602 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e1fb799d7d1a9e5122c7f55e21ae271341a63602 commit e1fb799d7d1a9e5122c7f55e21ae271341a63602 Author: Michael Tuexen AuthorDate: 2024-05-10 18:40:15 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:27:00 +0000 sctp: store heartbeat creation time as time_t Reported by: Coverity Scan CID: 1493087 (cherry picked from commit b67716dd58b93f373523cf35373c56fcfad44b12) --- 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;