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
This commit is contained in:
Baptiste Daroussin 2013-10-27 21:07:37 +00:00
parent 1ebe85202b
commit e0b95cb532
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257227

View File

@ -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;