diff options
author | Kristof Provost <kp@FreeBSD.org> | 2021-04-28 16:17:40 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2021-05-07 20:13:30 +0000 |
commit | cc948296e632e023f9374ccee68b5710f2ad54a9 (patch) | |
tree | 45b3054bc8ede549a81533d04c07a5336d59a161 | |
parent | f0c914baacc7f0eefe9ff47ed04aeb500b7bdcd5 (diff) | |
download | src-cc948296e632e023f9374ccee68b5710f2ad54a9.tar.gz src-cc948296e632e023f9374ccee68b5710f2ad54a9.zip |
pfctl: Optionally show gateway information for states
When showing the states, in very verbose mode, also display the gateway
(i.e. the target for route-to/reply-to).
Submitted by: Steven Brown
Reviewed by: donner
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D30051
-rw-r--r-- | sbin/pfctl/pf_print_state.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/pfctl/pf_print_state.c b/sbin/pfctl/pf_print_state.c index 810c773f1019..e2f9d6efe609 100644 --- a/sbin/pfctl/pf_print_state.c +++ b/sbin/pfctl/pf_print_state.c @@ -354,6 +354,8 @@ print_state(struct pfsync_state *s, int opts) bcopy(&s->id, &id, sizeof(u_int64_t)); printf(" id: %016jx creatorid: %08x", (uintmax_t )be64toh(id), ntohl(s->creatorid)); + printf(" gateway: "); + print_host(&s->rt_addr, 0, s->af, opts); printf("\n"); } } |