From nobody Mon Apr 21 12:49:08 2025 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 4Zh4tr4g12z5tRdL; Mon, 21 Apr 2025 12:49:08 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zh4tr3TXvz3nnY; Mon, 21 Apr 2025 12:49:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745239748; 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=peqtXmZCOAjNWcyvlgce1zkOi0EgkRDqh54evlkODis=; b=ZIrBQh/variMOTQXis5tqjictRhm89ZhpFuqqWIVQmDr8HdOLe6VlYBjKVLDnwQbAJ2w+q SGT+Ct6kAxXsPDG5e6tOCX4JoCYnjy/IOdb6ZRq9lXY8dtDgCrncxEkoHNUJINBTe4cQKs p82L3SRC9eSxTmgrdPAAiYsB+tM9hXDF4L8hOCS0rFwLYgKODUECaxBBznzNuDOnWJcUnx tsqj+0ilZWa3zGWtkLLgrTZH9wGvky7vKq5icEwcrvkMXnc1sGhhyCtFiW3heABCp/UW+Q eCcxxZI3QzVc9CIRUBkjQUdvt8xFUIm0n6pu88k1laziuyKKKlUd4bL51X5HqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745239748; a=rsa-sha256; cv=none; b=P/GbD1Vzrop1OsMfLQS9WMrGP2UXAIvNcD0srQ3yegCC7+LVy3q15wivjQ2uPuF8YoZoWb noqU0ogVIiKG3hoLseWz21SFkIoD0k/0KhSKw3mT3dtIG4hWvxtEAFNq3/ygSVSRQxfufu Q0waOaCfv8BEaoa16ICotpG72qYdNKo4avZTvIHh0pAT2gWT6NCWWyc/VnE29QMHaQI9kv vfMVtmWr2Gg+gp36SNzBrVCwgZ2+W6049F+KVmlIeQ2H3n69/Gd5gDR1ZDg5k/o4V5gevz 9iicVxRYp8Jb+YfRpkcWlatwmgR+/aCPNSaG+izYmCFiTbqLs0TAIWBSuFGFIg== 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=1745239748; 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=peqtXmZCOAjNWcyvlgce1zkOi0EgkRDqh54evlkODis=; b=wKu+0ilpyDURiwsKt2+eNEitQhxM3m63eXjgww6ZXbA6x6npuBnxeQpLuxtrzRzhn7tOKS abcaa4HuG6bKiFmEbVfU1t7Wbdd8uVeePr83hu/4hHJMmwrfDvY9diwTAj43++SVnlOF8O 7CGtaunqEEkPquOIlGmsHXBuRZ34E3B/h3nb5muPU7obKn4q2TVK4cKBCJe2J3ZLCM0ARu p915jxEXnMrAw3oLXp+WlnHvW/V03EH7ue5Dv3sg/gMb+KeaFIN9L+9/fEauUvMFu+qto3 n7KEKiASfgPUR/MWzD6J81vMgb7xw5KCjwrZTMnFt1XC4B3QniHsvy1S/dKZXw== 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 4Zh4tr32bHzrDQ; Mon, 21 Apr 2025 12:49:08 +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 53LCn8mo077538; Mon, 21 Apr 2025 12:49:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53LCn8rO077535; Mon, 21 Apr 2025 12:49:08 GMT (envelope-from git) Date: Mon, 21 Apr 2025 12:49:08 GMT Message-Id: <202504211249.53LCn8rO077535@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: 88986a4d7183 - main - pf: fix ICMP pcksum pointers 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 88986a4d71836e120deb838be86e51084f863772 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=88986a4d71836e120deb838be86e51084f863772 commit 88986a4d71836e120deb838be86e51084f863772 Author: Kristof Provost AuthorDate: 2025-04-16 14:55:26 +0000 Commit: Kristof Provost CommitDate: 2025-04-21 08:43:31 +0000 pf: fix ICMP pcksum pointers We didn't set it for ICMP, and used the ICMP header for ICMPv6. Fortunately the checksum is in the same place in the header for icmp4 and icmp6, but use the correct name anyway. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 88e9ef78f07c..463504bebcbc 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -10064,6 +10064,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, REASON_SET(reason, PFRES_SHORT); return (-1); } + pd->pcksum = &pd->hdr.icmp.icmp_cksum; pd->hdrlen = ICMP_MINLEN; break; } @@ -10096,7 +10097,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, return (-1); } pd->hdrlen = icmp_hlen; - pd->pcksum = &pd->hdr.icmp.icmp_cksum; + pd->pcksum = &pd->hdr.icmp6.icmp6_cksum; break; } #endif /* INET6 */