From 32f27553f27b0bc53f7fbe6edbc6133e57237f55 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Wed, 28 Apr 2021 18:17:40 +0200 Subject: [PATCH] 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 (cherry picked from commit cc948296e632e023f9374ccee68b5710f2ad54a9) --- sbin/pfctl/pf_print_state.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/pfctl/pf_print_state.c b/sbin/pfctl/pf_print_state.c index 810c773f101..e2f9d6efe60 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"); } } -- 2.45.0