summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/pf_print_state.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2010-11-12 13:14:41 +0000
committerclaudio <claudio@openbsd.org>2010-11-12 13:14:41 +0000
commit471800d7298b302b8caef611f7045c304ce75fd1 (patch)
treea6071f9470e833d81ac8cc15e5f2c2ff2e12a229 /usr.sbin/tcpdump/pf_print_state.c
parent- introduce quote() which prints its arguments quoted for sh/ksh parsing (diff)
downloadwireguard-openbsd-471800d7298b302b8caef611f7045c304ce75fd1.tar.xz
wireguard-openbsd-471800d7298b302b8caef611f7045c304ce75fd1.zip
The ioctl to show states returns a pfsync_state which is in network byte
order and therefore a ntohs is needed to show the rdomain correctly. OK henning@ dlg@
Diffstat (limited to 'usr.sbin/tcpdump/pf_print_state.c')
-rw-r--r--usr.sbin/tcpdump/pf_print_state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/pf_print_state.c b/usr.sbin/tcpdump/pf_print_state.c
index f25fac362fb..4f18e689ee3 100644
--- a/usr.sbin/tcpdump/pf_print_state.c
+++ b/usr.sbin/tcpdump/pf_print_state.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_print_state.c,v 1.8 2009/11/03 10:59:04 claudio Exp $ */
+/* $OpenBSD: pf_print_state.c,v 1.9 2010/11/12 13:14:41 claudio Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -129,11 +129,11 @@ print_name(struct pf_addr *addr, sa_family_t af)
}
void
-print_host(struct pf_addr *addr, u_int16_t port, sa_family_t af, int rdom,
+print_host(struct pf_addr *addr, u_int16_t port, sa_family_t af, u_int16_t rdom,
int opts)
{
if (rdom)
- printf("(%d) ", rdom);
+ printf("(%u) ", ntohs(rdom));
if (opts & PF_OPT_USEDNS)
print_name(addr, af);