From nobody Wed May 7 10:31:19 2025 X-Original-To: net@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 4Zss4S0f3Qz5w5wD for ; Wed, 07 May 2025 10:31:20 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zss4R6rfrz3qlt for ; Wed, 07 May 2025 10:31:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746613880; 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: in-reply-to:in-reply-to:references:references; bh=6lgo4B/fGtYzkBY/cPBbj0fo5zI/8LTNQ5pA89yrCxw=; b=aQ0g2cf4fhxlhCMz4z7MhOVkg25cpd3kYIx4wN51+qCwzG1KWGNAFafTulRLPVkQhkzX1s poVAS8GaFfur2OrAnuQ8edCzOBWnxg825R/1HcRrvpCip3rOephvhEa0LKleymM3C09S1F NlMLSbnHlgFVoTyfOecHiiwOhiwRa8RBfBPtdJzOUuSKMR6Yb66zXVj8FmmKP597lvGV1z p9W7vupmzWRyqU19uGVsviNrwKPI6By4Ve0/ekcfXGMGWFcSeB8wCFHFmUOHq2/kw5fMDb WN6dfgF04zTQ2c+oL1xtiwVZiXMxwAJH1gamebsJuh8ky5/Fqq1nMG7p3LVefw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746613880; 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: in-reply-to:in-reply-to:references:references; bh=6lgo4B/fGtYzkBY/cPBbj0fo5zI/8LTNQ5pA89yrCxw=; b=NgQCeF5MRBiXHqgwJBAxairnyKU6ci3RPetMrnVa7bikGr88a4uJII+lS+Mn49e7n0jUHn qL9qV9QMajLj2PKnswldWQE93abIon+B23UKnioUwMtfMIUKYEa9ikzCNxX7Ba6ewRqJ0E ZCnPeRJJT06nxmXfiEN8T1U+GKnBhWthhssoGmYktcO9phIp8NOxrnCb3i631OACuy1c7d Ss1rHop1mTyvNAq+tlXp3sm+foUEJBDK8377jXZIxoo/GqrYxTojHN9P6Jr2o9OQx75UPK LPKi5ryC9d4qWxeo4qXxRAzKUMd3r93qvK34MN3XrwajVmmhwjYI5VD8oNX2fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746613880; a=rsa-sha256; cv=none; b=kTQJ/8SzEAYXy/mW5I9U2agaNhcPXNbrUVa1grE8oEkKt+j9gVAPyjHBlfiVlhYhaVnjmm L6yA5SKoglhqqL9vX8ysKpJ2qBG395n256Dn2yflfZDgaVTSmi6lIV5GtFRQNBEhLV0fyU nA6N+Ln9Pwb5g5bNdIi0OfAIghUK4XheXde2aILaRPV0W5VhvFkCKdk04obQt9tsd6lHE/ tYZNl8V1YCm75IxO/Sk9V+InT2C7UsYo4KH2Jtm7UDil9Pry4IUgjYNiExXYcJbttL8ct1 3nhv4lGveM5jbdBbUD61RQQKO18adpa1NmnPkEtaKtGai7btI8AdRBu2MyCKYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4Zss4R6MwQz9Ct for ; Wed, 07 May 2025 10:31:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 547AVJnD005883 for ; Wed, 7 May 2025 10:31:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 547AVJ90005882 for net@FreeBSD.org; Wed, 7 May 2025 10:31:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 280390] NPTv6 not working Date: Wed, 07 May 2025 10:31:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tatsuki_makino@hotmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ipfw@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280390 --- Comment #21 from Tatsuki Makino --- (In reply to Tatsuki Makino from comment #20) In the end, I came back to the method of using this :) I wanted to keep one_pass enabled, so I used a strange method with dynamic rules, but with the following patch, I tried to resolve the issue of icmpv6 being unable to pass. The results of ipfw -D show indicated that more than 2 packets were captured due to the ipv6-icmp rule, this patch may be meaningful :) Below is the patch. It has been applied to 14.3-PRERELEASE. diff --git a/sys/netpfil/ipfw/ip_fw_dynamic.c b/sys/netpfil/ipfw/ip_fw_dynamic.c index d26e05e5d15..23902a52404 100644 --- a/sys/netpfil/ipfw/ip_fw_dynamic.c +++ b/sys/netpfil/ipfw/ip_fw_dynamic.c @@ -487,6 +487,15 @@ SYSCTL_U32(_net_inet_ip_fw, OID_AUTO, dyn_keep_states, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(dyn_keep_states), 0, "Do not flush dynamic states on rule deletion"); +#ifdef INET6 +VNET_DEFINE_STATIC(int, _dyn_auto_add_icmpv6) =3D 0; +#define V_dyn_auto_add_icmpv6 VNET(_dyn_auto_add_icmpv6) +SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, + _dyn_auto_add_icmpv6, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(_dyn_auto_add_icmpv6), 0, + "ipv6-icmp dynamic rule is also added at the same time when ip6 dyn= amic rule is added"); +#endif /* INET6 */ + #ifdef IPFIREWALL_DYNDEBUG #define DYN_DEBUG(fmt, ...) do { \ printf("%s: " fmt "\n", __func__, __VA_ARGS__); \ @@ -1930,8 +1939,22 @@ dyn_install_state(const struct ipfw_flow_id *pkt, uint32_t zoneid, ulp, pktlen, hashval, info, fibnum, kidx, type); #ifdef INET6 else if (IS_IP6_FLOW_ID(pkt)) + { ret =3D dyn_add_ipv6_state(rule, ruleid, rulenum, pkt, zoneid, ulp, pktlen, hashval, info, fibnum, kidx, type); + if (V_dyn_auto_add_icmpv6 && ret =3D=3D 0 && + (pkt->proto !=3D 0 && pkt->proto !=3D IPPROTO_ICMPV= 6)) { + struct ipfw_flow_id id; + id =3D *pkt; + id.proto =3D IPPROTO_ICMPV6; + id.src_port =3D 0; + id.dst_port =3D 0; + if (dyn_add_ipv6_state(rule, ruleid, rulenum, &id, + zoneid, ulp, pktlen, hashval, info, fibnum, kid= x, type) !=3D 0) { + /* ignore failure */ + } + } + } #endif /* INET6 */ else ret =3D EAFNOSUPPORT; --=20 You are receiving this mail because: You are on the CC list for the bug.=