From nobody Wed Feb 09 09:44:13 2022 X-Original-To: dev-commits-src-branches@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 E427E19C7D6A; Wed, 9 Feb 2022 09:44:13 +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 4Jtw254Zgcz3CjH; Wed, 9 Feb 2022 09:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644399853; 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=m5DvocZahbb9FKCdT04D1tiSZLMUI6tOEcxOPv48uk4=; b=n1kCdXT5jHBiFLzYE3D2f2wUcNC0fH6VDmJYPOcXUHqHji7J2gRX1xKnaUC489ubw0D2AZ 5Rh+5SPjoJnWWeC1xRHW6AIHD7phZ6KR/Y//Xf/Cn4pk/LxICmIolQqaHLfAXcJnv6JBbM yxxReyvJwap2BCNVf6sGDaSHHaeemh0Fnnuk4bhtarZU3rO5XOd/+9EzBXOeZBEKR+2Z2q 7hMmzmfxVcDYfDp0MgFloLtqeio5oCZNRy/tqB8oAV7yhBABiOXzZ/g2F5IGURoG1PhOpy WzRUT8bTPzuoa3PXZvESnmapL8c4hqhm0VPeWzGd3/g3neJJ8yeCJXb5saVWHw== 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 617CB2D15; Wed, 9 Feb 2022 09:44:13 +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 2199iDHF004067; Wed, 9 Feb 2022 09:44:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2199iDsG004066; Wed, 9 Feb 2022 09:44:13 GMT (envelope-from git) Date: Wed, 9 Feb 2022 09:44:13 GMT Message-Id: <202202090944.2199iDsG004066@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: c6745a0cc40e - stable/13 - pflog: align header to 4 bytes, not 8 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c6745a0cc40e77ed3b783a0a8050b42bdf682e57 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644399853; 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=m5DvocZahbb9FKCdT04D1tiSZLMUI6tOEcxOPv48uk4=; b=rwNGjheZhr0VAJoD/VJWU6H9tBWVigSi9ZFS4mOhQq8gcRclAl8fsCSX6+A1+igPtkH2We 1t21d1A5W0Wb+6tikAszw6rHrdgJ8alpbDlzktBSf/1O6H4Ku4D+q98XAwu37qDvaCTP+Z Gx7TO45pYH4+ZQVYrj6FFSmERCXsC58Qs34CM0/UpcrdnVMFUOweJF8f9v9k5Lpbie53Ty 4YXiFoqa7QBtxct9uM9b2ljMUsUBmoIqaZxlpKL7WQvacHr9Ai0NCSHobnAO++45mifkKx yghVYbkKMIPIDgeSdIz3EElNvzfu4KX5S6K1pUQtJSrK38lC5k1y4GLIiOAdnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644399853; a=rsa-sha256; cv=none; b=Eh/Rmzc3N1KQ9wGTG/Zit88k5TTbUBEcUiFnzn00MiNMuyZznA0hMCbf7W/N0k6mVx8Sv6 m2g0bcJekZo7O9aqMbgal3pxMPAUnqHDPSDGm+RqC2/OldRvhEViB1DTGKlm9QH2vtov/n 1EAq9sOoVsRL28000bOLYaljuHixwX76uHwd4SWtQh0rK45YoqpZtgYDZdlPNO9zdC05p5 G24v67v/9UE3KsWAEXC/qPo7bWwPhtg7leSDu1IrQoBteeyjQ8tYcrFbbjJ+nQYIc4wJF9 7ryZvWtNDxIL7O09p29k5x9XsHaFY7C/u4YqmffabrRI+aZLqfAOjVpRapT50w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c6745a0cc40e77ed3b783a0a8050b42bdf682e57 commit c6745a0cc40e77ed3b783a0a8050b42bdf682e57 Author: Kristof Provost AuthorDate: 2022-02-01 07:56:49 +0000 Commit: Kristof Provost CommitDate: 2022-02-09 09:40:58 +0000 pflog: align header to 4 bytes, not 8 6d4baa0d01 incorrectly rounded the lenght of the pflog header up to 8 bytes, rather than 4. PR: 261566 Reported by: Guy Harris MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 4daa31c10867b133bdc2a424e1e60d280384dc56) --- sys/net/if_pflog.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/net/if_pflog.h b/sys/net/if_pflog.h index 0406f78474a8..443c1cc36cf6 100644 --- a/sys/net/if_pflog.h +++ b/sys/net/if_pflog.h @@ -33,7 +33,6 @@ #include -#include #include #define PFLOGIFS_MAX 16 @@ -60,7 +59,9 @@ struct pfloghdr { u_int8_t pad2[3]; }; -#define PFLOG_HDRLEN BPF_WORDALIGN(offsetof(struct pfloghdr, pad2)) +#define PFLOG_ALIGNMENT sizeof(uint32_t) +#define PFLOG_ALIGN(x) (((x) + PFLOG_ALIGNMENT - 1) & ~(PFLOG_ALIGNMENT - 1)) +#define PFLOG_HDRLEN PFLOG_ALIGN(offsetof(struct pfloghdr, pad2)) /* minus pad, also used as a signature */ #define PFLOG_REAL_HDRLEN offsetof(struct pfloghdr, pad2)