Skip to content

Commit 1dee233

Browse files
committed
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 <[email protected]> Sponsored by: Rubicon Communications, LLC ("Netgate")
1 parent 2f29d0f commit 1dee233

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

sbin/pfctl/pf_print_state.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,13 +324,8 @@ print_state(struct pfctl_state *s, int opts)
324324
} else if (proto == IPPROTO_SCTP) {
325325
printf(" %s:%s\n", sctp_state_name(src->state),
326326
sctp_state_name(dst->state));
327-
#ifndef INET6
328-
} else if (proto != IPPROTO_ICMP && src->state < PFOTHERS_NSTATES &&
329-
dst->state < PFOTHERS_NSTATES) {
330-
#else
331327
} else if (proto != IPPROTO_ICMP && proto != IPPROTO_ICMPV6 &&
332328
src->state < PFOTHERS_NSTATES && dst->state < PFOTHERS_NSTATES) {
333-
#endif
334329
/* XXX ICMP doesn't really have state levels */
335330
const char *states[] = PFOTHERS_NAMES;
336331

0 commit comments

Comments
 (0)