From nobody Tue Feb 1 17:18:38 2022 X-Original-To: dev-commits-src-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 8BE2D19A4BB1; Tue, 1 Feb 2022 17:18:38 +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 4JpBV63bKPz4vhZ; Tue, 1 Feb 2022 17:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643735918; 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=YeIAjmWE+XhlL/fp9bpj4bJjdAij1sgKH67IuaHTpW0=; b=Kjhn6Eo5EryMHus+Ci5XkBzndIln5pPoRW5W2HTky0cTqZr0ahFLlaSnfAnlWhawgBGfbD u6Rz7Bb3dyAHH7DPds01yERyKDLhBLuExjAayKVUR3eI6aX0GjtdQpo2yUhI0+NlK3OU3x PSFkVC+FxyAqFx4eWys3qs/cbQzazVYsdjAo3HDxQPGQ+4bnMbnqvzJACyOvoDHdTlnBYn nPXKPHtp61B3Q4FgJc+7FWvo1RDNl/lIHEcSYKc/BUjPSn8b33avXA9iPDKrJIPlPsCgeC Tae9tEjJtMITL6ip3ebVQMqgq/nTnCEc0u5qDW5mYx+UxlpqHmKo97CITkeU9w== 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 5BD6214D9F; Tue, 1 Feb 2022 17:18:38 +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 211HIcIH099861; Tue, 1 Feb 2022 17:18:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 211HIcW4099860; Tue, 1 Feb 2022 17:18:38 GMT (envelope-from git) Date: Tue, 1 Feb 2022 17:18:38 GMT Message-Id: <202202011718.211HIcW4099860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 4daa31c10867 - main - pflog: align header to 4 bytes, not 8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 4daa31c10867b133bdc2a424e1e60d280384dc56 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643735918; 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=YeIAjmWE+XhlL/fp9bpj4bJjdAij1sgKH67IuaHTpW0=; b=hMeeUOc+2OSIEQU5qZXDKSJKvVwhPxbmEpZB3hxPQ8juw9FzSBQjy/PlZHGZurkkzjnSp2 KiY+pkLbmG27Np8Gk3Oecfzny7kJoggrdqKZQ+8SFih3k8zv9YjvYsQOz/rjYUsa3gO7FL ZswjcKYwbvps4ZXXDB08H1pScQMimXC0UNgXQ3U+HSMdvSmK5iP8x1wFEc0pHsWSNHVvhQ jMit6DcKQQQeGJ+uFMNd8CtdHP6+VAuidnFjpkFJ3RBh8OQ5QDXieJwXAPvWkEvVU+ByES tdCtGYiMMh3TObauLRIC2YXjsgcUWBVtTJDIB4FrOlD1+3TTc7pMsyf0LTduHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643735918; a=rsa-sha256; cv=none; b=BIy/up18HluGa/VHhQTeAobhKv+A6oQq7qb6zJZd4HjYTEqE9nmoIrhnM4Z0Z2O0E9mlEV RuavyWANTntE75IhETEuxNvRGPcZvTP/FUayJHSiU+HQ0MalzEjJm1wwbr3AVZpUWlXK3u OrZ8W88r9aGs64+jGwl4au74eIR988VLUftAVShlG/xuAvtZ3J6flJ3qK5H5L2pmsQmIkt oZAc4QgE9h1YvS/dDBEI7/Cx/hpFM9MEvSN0Wj2dSghwy5yfW76j8jEbB+Dn31+9wYghJd G+CZCucs2aX/sSw5fTejlkmawOBJLM/UGFH+Zyrin92gI7alThO3WWHvRxcpkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4daa31c10867b133bdc2a424e1e60d280384dc56 commit 4daa31c10867b133bdc2a424e1e60d280384dc56 Author: Kristof Provost AuthorDate: 2022-02-01 07:56:49 +0000 Commit: Kristof Provost CommitDate: 2022-02-01 17:17:44 +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") --- 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)