From nobody Wed Feb 09 09:56:51 2022 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 B471419A97C2; Wed, 9 Feb 2022 09:56:52 +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 4JtwJh24p3z3JTf; Wed, 9 Feb 2022 09:56:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644400612; 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=2DqduMndJ8oJ2HDQvfubTqGJ9Vbu91WeGH8l/I9tlMg=; b=ISy8L4NutqYp7mV0VYXQ9X7H5qx3JbiexLw0I3ztkyCKXA6kx6LUkQW0oAYLQdh2Eci9gy rau/wNvLcCAbDKz0bGa49Zl1fG01nbtg2waBuvdmYsZ7cT5mANw63AJs4ijE9natkCJoMs g65mz1tJot+jqgPPVFXm9SwypaNFBH+zBYxEXVQ1R+6M18sWx4WGYpGnps1h5sufFsxr5u SvAwGD8Fh+Ae/P7gLgF7jZHTddu6xjfD1CLJmjK5xb34o82nAAx1h1gfvI+eBwI/SoaYAD IG4bPuQZJGt29bcWvudARsc8Ps5aV9SoKB7uXG5q6MZ/Ef7jVPC/hmmlzlVNgw== 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 104F8306F; Wed, 9 Feb 2022 09:56:52 +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 2199upkj017909; Wed, 9 Feb 2022 09:56:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2199upWU017908; Wed, 9 Feb 2022 09:56:51 GMT (envelope-from git) Date: Wed, 9 Feb 2022 09:56:51 GMT Message-Id: <202202090956.2199upWU017908@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: 275f412b070f - stable/12 - pflog: align header to 4 bytes, not 8 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/12 X-Git-Reftype: branch X-Git-Commit: 275f412b070f0d23b028f8bde85182a1f6d0fe7c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644400612; 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=2DqduMndJ8oJ2HDQvfubTqGJ9Vbu91WeGH8l/I9tlMg=; b=ckXTc/ok0LWl9GExUrDVIVz3BtWevrUlBMqFc6USYfMwCkX5XQH6X2C75qzuW83ocSCd88 VLBLN5KAAf9s05Y4U6c2tMQGt31uHA6DKCr9Ohm3YtOz8t354C2oBcPXdvRDj7FDrEtabo fIHnAtb1ldHviNhY4mDu4SGmF/COSSrTzKcMq04izdUE4kBNp607URcStWv1Hrk9UKBpgZ 4oKOykk0vMRfxzo5qxIaL96OMZG8LPLEwbx8M2YKFP3qqIK67ZrgE8JlN3grbnN0Je8xOr KRU9dSLfPj2qkF9Dn86Scr6DcS8sNTnRJBWWgphUwwaoKPwA99DVmxnlzwNniA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644400612; a=rsa-sha256; cv=none; b=gpCc4dqz5iHVYaaONCwh2mFgcxWwVXPjP7S4xERA4QaqP7CrCvxtBHQ/FjZ3gXDyEb0aMz Q7jloNcQ2KBh4adAyn77nAs+j3PA22svAguk3s8wyX0trKeS8vNRUjYIg2zM0H/Q0QGAED GS8jwT0442cigNC8y4su+5cyIjSUi+sGhRNHx89XXcmprIVzWuK+kMsD4n4BLyPP+Oo8zJ VB4E134NCUPA2omAwq1kAV7gDwWL17aPVEFoI63+VH9VA4xFg/VlVtD6rQK+b6UAbEa8Vv h+r4h8alXTbtLMXlDem6lsMsQZk/1tmlQ5CKeVUJ1j8NbDXloIOtiSUdoFu1dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=275f412b070f0d23b028f8bde85182a1f6d0fe7c commit 275f412b070f0d23b028f8bde85182a1f6d0fe7c Author: Kristof Provost AuthorDate: 2022-02-01 07:56:49 +0000 Commit: Kristof Provost CommitDate: 2022-02-09 09:56:36 +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)