summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcedric <cedric@openbsd.org>2003-04-09 15:38:46 +0000
committercedric <cedric@openbsd.org>2003-04-09 15:38:46 +0000
commita91b00f2d59b1ff6125bb2a8a433211ab5553904 (patch)
treeb369ad8182c3677e22e35cebee9b25cf71f3c471
parentChange pf_state structure to point to both a rule and the anchor, (diff)
downloadwireguard-openbsd-a91b00f2d59b1ff6125bb2a8a433211ab5553904.tar.xz
wireguard-openbsd-a91b00f2d59b1ff6125bb2a8a433211ab5553904.zip
on "pfctl -vvss", print the anchor rule number when there is one.
ok dhartmei@ henning@
-rw-r--r--sbin/pfctl/pf_print_state.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/pfctl/pf_print_state.c b/sbin/pfctl/pf_print_state.c
index 6c16f06705f..3ed6df2ded2 100644
--- a/sbin/pfctl/pf_print_state.c
+++ b/sbin/pfctl/pf_print_state.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_print_state.c,v 1.24 2003/04/03 15:52:24 cedric Exp $ */
+/* $OpenBSD: pf_print_state.c,v 1.25 2003/04/09 15:38:46 cedric Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -240,6 +240,8 @@ print_state(struct pf_state *s, int opts)
s->expire /= 60;
printf(", expires in %.2u:%.2u:%.2u", s->expire, min, sec);
printf(", %u pkts, %u bytes", s->packets, s->bytes);
+ if (s->anchor.nr != -1)
+ printf(", anchor %u", s->anchor.nr);
if (s->rule.nr != -1)
printf(", rule %u", s->rule.nr);
printf("\n");