diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2019-02-02 15:43:19 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2019-02-02 15:43:19 +0000 |
commit | d586512bf0555d68887412d2f1a5e1a5aa1b6481 (patch) | |
tree | cfcfe020b95c8d26ab7d1d5b32834eb88b775b7d /sbin/pfctl/pf_print_state.c | |
parent | 6788ea3208389863ec35ad8f8e841dadc743a50f (diff) |
Show the routing address selected by "route-to" in "pfctl -s states".
ok sthen
Diffstat (limited to 'sbin/pfctl/pf_print_state.c')
-rw-r--r-- | sbin/pfctl/pf_print_state.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sbin/pfctl/pf_print_state.c b/sbin/pfctl/pf_print_state.c index bbcc749cc69..a195b9403e8 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.68 2018/09/07 10:29:22 kn Exp $ */ +/* $OpenBSD: pf_print_state.c,v 1.69 2019/02/02 15:43:18 yasuoka Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -241,6 +241,11 @@ print_state(struct pfsync_state *s, int opts) sk->rdomain, pn, opts); printf(")"); } + if (s->direction == PF_IN && !PF_AZERO(&s->rt_addr, sk->af)) { + printf(" {"); + print_addr_str(sk->af, &s->rt_addr); + printf("}"); + } if (s->direction == PF_OUT || (afto && s->direction == PF_IN)) printf(" -> "); else @@ -255,6 +260,11 @@ print_state(struct pfsync_state *s, int opts) sk->rdomain, pn, opts); printf(")"); } + if (s->direction == PF_OUT && !PF_AZERO(&s->rt_addr, nk->af)) { + printf(" {"); + print_addr_str(nk->af, &s->rt_addr); + printf("}"); + } printf(" "); if (s->proto == IPPROTO_TCP) { |