Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Dec 2025 21:50:35 +0000
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1dee2336ab44 - main - pfctl: report ICMP states consistently for IPv4/IPv6
Message-ID:  <693ddfab.35dce.35d7e471@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help

The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=1dee2336ab44e604f4871c46e7ccb2f7f1e33054

commit 1dee2336ab44e604f4871c46e7ccb2f7f1e33054
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-12-12 17:07:19 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-12-13 21:50:22 +0000

    pfctl: report ICMP states consistently for IPv4/IPv6
    
    Remove the '#ifndef INET6', which never actually mattered because this
    define is never set. This makes us report ICMP states for IPv4 and IPv6
    the same way (and also aligns us with OpenBSD).
    
    This means we will now always report state 0:0 rather than
    NO_TRAFFIC:NO_TRAFFIC for icmp6 (like we already did for icmp).
    
    Reported by:    Lev Prokofev <lev@netgate.com>
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sbin/pfctl/pf_print_state.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/sbin/pfctl/pf_print_state.c b/sbin/pfctl/pf_print_state.c
index 417ff70de975..1c5a46f86b35 100644
--- a/sbin/pfctl/pf_print_state.c
+++ b/sbin/pfctl/pf_print_state.c
@@ -324,13 +324,8 @@ print_state(struct pfctl_state *s, int opts)
 	} else if (proto == IPPROTO_SCTP) {
 		printf("   %s:%s\n", sctp_state_name(src->state),
 		    sctp_state_name(dst->state));
-#ifndef INET6
-	} else if (proto != IPPROTO_ICMP && src->state < PFOTHERS_NSTATES &&
-	    dst->state < PFOTHERS_NSTATES) {
-#else
 	} else if (proto != IPPROTO_ICMP && proto != IPPROTO_ICMPV6 &&
 	    src->state < PFOTHERS_NSTATES && dst->state < PFOTHERS_NSTATES) {
-#endif
 		/* XXX ICMP doesn't really have state levels */
 		const char *states[] = PFOTHERS_NAMES;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?693ddfab.35dce.35d7e471>