From nobody Fri May 05 22:01:20 2023 X-Original-To: dev-commits-ports-main@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 4QCl4x08wxz49rf6; Fri, 5 May 2023 22:01:21 +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 4QCl4w6r4dz3jnG; Fri, 5 May 2023 22:01:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683324081; 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=JX5r/POR9VrZsKnZoeeLj8r64+nTcLX7gxb4tufBRf0=; b=Ecp7aZWBifEmoTAh8navONKcpSXdz6X9pQ3zBdUTaeQ8F1I4Upe7zualvtfNWl6hIFjU8k sYVNipIPi7RxFUuUvAIYK79+FZHxqjOTCY6aLvPY4/w+O4EleXujK3RoqOK2hWjj6OeiZn maTbBX0EMpD7LXV3pQldYCaquGnd0jSzYT+yeC5oXz+aOdfW+xtAoc0GdMj6DpIe385T3F Kchx3GglNz9ZsOvK/o550hyOF5SKACl/x7Osk8rqswOSLSs1GRLr5mSWHxTYjMBiVu70b8 PIeRz6wRETKrkQAZSKkJRYYxktRcSv/OUwvG2YL0f+aHmnAf3DBDTEFe4DKFAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683324081; 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=JX5r/POR9VrZsKnZoeeLj8r64+nTcLX7gxb4tufBRf0=; b=lo6edlXcL/BmXqhvEZmBva1PvDTFsBPu6sh1gHET0q3aJ1Q4RmKvZSZZmOAZF1GBW6AA0U g4DrJK6PZTY00HpMgjSu8L0szxw9fKAZcgPZF+npOhqf7LSi4/Ii9S+GAROz4Ha85wkxkJ VZtB7AgJfhFpvIESwbKWgfaOEglklt3YATeSFvWYgH6io81XKGkqeczE4Oi267ycJPG4Z9 2Rj5hTxFUrwH5EWOKOlKZ51pGUA0AYopoxCNKcsyjSWc4p5KuQBnZhgJN8mHkWYxdrvaqJ 8KwuitPnGiOy3M4sbG3457j3j9YIB9Fy+1j8MB59TAp3qF8RTQvezof+b90yXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683324081; a=rsa-sha256; cv=none; b=lPnagW4CwGRG43AA+3U6LDv6imFueQeMuIIAxzb+BlPw8z/jLIvcxoMTEbGpA3tTtgnNcr zEF5WhCX6dODk3RJLpomWSBYP4c2upOZTgdNjXKL0iGIftNQ3JWv6Dv9NeXYedtrLd203f qPFKzGLjbvdQGMgSa8APZczOspCh4aUmWaCdRe8OsCckzhR5RzUlzG0sDgxlJ5EcFi8c5s TQ33UKEemHh6iY1rcCejpak5hVZiJPaempW/8+lgZ+38+SdUW8EhKrCrK/VwMGqXVgmNm2 KesKQ1JENhly8vUycNtlBpPBHotGrvysxJjPnADZlWBt+N/KE7fggc725pC1mw== 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 4QCl4w5tr7z19GQ; Fri, 5 May 2023 22:01:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345M1Klo068496; Fri, 5 May 2023 22:01:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345M1KAJ068484; Fri, 5 May 2023 22:01:20 GMT (envelope-from git) Date: Fri, 5 May 2023 22:01:20 GMT Message-Id: <202305052201.345M1KAJ068484@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Christian Weisgerber Subject: git: 0838f527c3aa - main - net/openntpd: fix for NICs with hardware timestamp support List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: naddy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0838f527c3aa5a90e949d33e6331dcba12041ca1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by naddy: URL: https://cgit.FreeBSD.org/ports/commit/?id=0838f527c3aa5a90e949d33e6331dcba12041ca1 commit 0838f527c3aa5a90e949d33e6331dcba12041ca1 Author: Christian Weisgerber AuthorDate: 2023-05-05 20:07:32 +0000 Commit: Christian Weisgerber CommitDate: 2023-05-05 22:01:17 +0000 net/openntpd: fix for NICs with hardware timestamp support OpenNTPD enables the reception of a timestamp with datagrams. Network adapters that support hardware timestamping of packets, e.g. mlx5en(4), create a SCM_TIME_INFO control message in addition to the SCM_TIMESTAMP one. Provide a sufficiently large buffer to accommodate this and avoid a MSG_CTRUNC error. PR: 271224 Obtained from: Dmitry Wagin --- net/openntpd/Makefile | 2 +- net/openntpd/files/patch-src_client.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/net/openntpd/Makefile b/net/openntpd/Makefile index 504bcf75fa60..4c1046e3e0dd 100644 --- a/net/openntpd/Makefile +++ b/net/openntpd/Makefile @@ -1,6 +1,6 @@ PORTNAME= openntpd PORTVERSION= 6.8p1 -PORTREVISION= 6 +PORTREVISION= 7 PORTEPOCH= 2 CATEGORIES= net MASTER_SITES= OPENBSD/OpenNTPD diff --git a/net/openntpd/files/patch-src_client.c b/net/openntpd/files/patch-src_client.c new file mode 100644 index 000000000000..88a1ecf36749 --- /dev/null +++ b/net/openntpd/files/patch-src_client.c @@ -0,0 +1,25 @@ +--- src/client.c.orig 2023-05-05 18:43:35 UTC ++++ src/client.c +@@ -274,6 +274,13 @@ handle_auto(uint8_t trusted, double offset) + } + + ++#ifdef SCM_TIME_INFO ++#define CMSG_MAXLEN (CMSG_SPACE(sizeof(struct timeval)) + \ ++ CMSG_SPACE(sizeof(struct sock_timestamp_info))) ++#else ++#define CMSG_MAXLEN CMSG_SPACE(sizeof(struct timeval)) ++#endif ++ + /* + * -1: Not processed, not an NTP message (e.g. icmp induced ECONNREFUSED) + * 0: Not prrocessed due to validation issues +@@ -289,7 +296,7 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime, + char buf[NTP_MSGSIZE]; + union { + struct cmsghdr hdr; +- char buf[CMSG_SPACE(sizeof(tv))]; ++ char buf[CMSG_MAXLEN]; + } cmsgbuf; + #ifdef SO_TIMESTAMP + struct cmsghdr *cmsg;