diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2013-10-27 21:07:37 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2013-10-27 21:07:37 +0000 |
commit | e0b95cb532b0a47f3441a395aee10651f6df9b7f (patch) | |
tree | bef56ebe19b24722a34f73297aa9c32fbcbd0a87 | |
parent | 1ebe85202b1af5f8e9e76fd6db1e883c8a5155fe (diff) |
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
Notes
Notes:
svn path=/head/; revision=257227
-rw-r--r-- | sbin/pfctl/pf_print_state.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sbin/pfctl/pf_print_state.c b/sbin/pfctl/pf_print_state.c index d4a2c1d2939b..46d4523373d5 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; |