git: 32f27553f27b - stable/12 - pfctl: Optionally show gateway information for states

Kristof Provost kp at FreeBSD.org
Fri May 14 13:06:51 UTC 2021


The branch stable/12 has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=32f27553f27b0bc53f7fbe6edbc6133e57237f55

commit 32f27553f27b0bc53f7fbe6edbc6133e57237f55
Author:     Kristof Provost <kp at FreeBSD.org>
AuthorDate: 2021-04-28 16:17:40 +0000
Commit:     Kristof Provost <kp at FreeBSD.org>
CommitDate: 2021-05-14 08:21:43 +0000

    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 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");
 	}
 }


More information about the dev-commits-src-all mailing list