From nobody Thu Aug 01 21:08:26 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 4WZhQL3JcQz5RSbN; Thu, 01 Aug 2024 21:08:26 +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 4WZhQL2Vcyz4RGZ; Thu, 1 Aug 2024 21:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722546506; 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=3ptE438r/kB/5FjMHObr2Id2T/JcN1nbh6yFgD9y554=; b=LtFehEFfOsxHzNQX4ojIE8Nmf1SJ0RhrhRHqbzta0Qic2b/O+pSxHzaCYOTqMbNvZ5y/S6 H4Nz3BoPWL46Mbl8pPfAaWlVKoN+5QUdKjCLP6kJkA8usfIUatO4vch144rRxBE0RjQijw 1RbExgfRg0alP7r3wVNswtUWbJTeEUhF6xmbZGtRBx/vcdUZrtYD8m+f8t6riBEWaYPYmV dRLjyI9FzuEByIrP2Q90lL+Cbe+vyeN4cVXx/tinp4ZwOR9//xAvQIiMC7aOwwdxnZEZGf IcnSmHHJCrWRGAZO+c+pp13zdexSQVve2zGAFVZu3JQKkT/X2GvcNQtuZ5MV7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722546506; a=rsa-sha256; cv=none; b=TobscA513Oq7980SG7PwrSP7U5T5dXL5rBEq9lhExOwFkXSEKthzEbm1C55ZmZLiACRkxX o1pzaOwIQhFSnrMvqlxWn7aKhhojWoJwUD5YUm4mIGW7wRY5H197AefpxO0n7wsjBZgV4t g3G3hh3TB+KtMMyRYQcsTQPhizHcZS6H1I1+pj/Ghhsw84sBoDIlhAoqtebG8PKjKW21Yb K/hFlMz2rPo62r5KvPDra8X6chFMyyNBO77eR2Q1f2Ma+J8smQsTczH6utHTTSXhBs+DIa pR+rqw1QXWOc/RV8SQ8brNUNONLUwj+UrwFk5k9DBgi6Pm4worlDGduAmiQ+dQ== 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=1722546506; 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=3ptE438r/kB/5FjMHObr2Id2T/JcN1nbh6yFgD9y554=; b=REQ07uZDq92rjJbJSkRWV+6wYCJxDCBv4vWpk36lOOAQ/dgaN9cZVy1rE9z2sCaky5fZhQ s93C4xNcJN51pwJz+LvVZInBw6TYyeIQkpRSSz9P3hvjG81e9hABO9cMhD3QkvjJVLkpTn eKOi0CcC1tZQy69AX/+TJtBNj/TQP4aVQaXLrKxFVX7wF0U5gstYSirC/yPEGbFHmven+g IC+pFmWPivH7zY17oq/396yGUPz8ce/WbPhUdMOoOblv0eLqCfXYMohFO/Tu/aN6hqk3oM 9Ou6ypoXG5lwg5FNI5G8/Vi76K5Q6gwynsr+UvnHpgI+iVRxElXSUr6X3yh5HA== 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 4WZhQL25Gtz111s; Thu, 1 Aug 2024 21:08:26 +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 471L8QRa091656; Thu, 1 Aug 2024 21:08:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471L8Q9b091653; Thu, 1 Aug 2024 21:08:26 GMT (envelope-from git) Date: Thu, 1 Aug 2024 21:08:26 GMT Message-Id: <202408012108.471L8Q9b091653@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: 8d9cdf264e43 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 8d9cdf264e43209a367d519b9443888dd0bccdf4 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=8d9cdf264e43209a367d519b9443888dd0bccdf4 commit 8d9cdf264e43209a367d519b9443888dd0bccdf4 Author: Michael Tuexen AuthorDate: 2024-05-10 18:40:15 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 21:07:52 +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 811cb8bab158..0fbfbd213eed 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 e719a5706f3b..bf4d383d732c 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -11286,7 +11286,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;