From 5449e20fb6562d1e14526a10b8fe9cd8b0ecd846 Mon Sep 17 00:00:00 2001 From: bapt Date: Sun, 27 Oct 2013 21:07:37 +0000 Subject: Import pf_print_state.c 1.54 from OpenBSD Original log: pfctl -ss printed state levels for ICMPv6. Disable this the same way it has already been done for ICMPv4. Difference with OpenBSD: - WITHOUT_INET6 safe Obtained from: OpenBSD --- sbin/pfctl/pf_print_state.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sbin/pfctl') diff --git a/sbin/pfctl/pf_print_state.c b/sbin/pfctl/pf_print_state.c index d4a2c1d..46d4523 100644 --- a/sbin/pfctl/pf_print_state.c +++ b/sbin/pfctl/pf_print_state.c @@ -285,8 +285,13 @@ print_state(struct pfsync_state *s, int opts) const char *states[] = PFUDPS_NAMES; printf(" %s:%s\n", states[src->state], states[dst->state]); +#ifndef INET6 } else if (s->proto != IPPROTO_ICMP && src->state < PFOTHERS_NSTATES && dst->state < PFOTHERS_NSTATES) { +#else + } else if (s->proto != IPPROTO_ICMP && s->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; -- cgit v1.1