summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/print-pfsync.c
diff options
context:
space:
mode:
authorcedric <cedric@openbsd.org>2003-12-31 11:18:24 +0000
committercedric <cedric@openbsd.org>2003-12-31 11:18:24 +0000
commitec359bd517bfb091098376e822c97cd76e87e41c (patch)
tree470e5be355e2908559bb53fdae23a71405301dbd /usr.sbin/tcpdump/print-pfsync.c
parentsync (diff)
downloadwireguard-openbsd-ec359bd517bfb091098376e822c97cd76e87e41c.tar.xz
wireguard-openbsd-ec359bd517bfb091098376e822c97cd76e87e41c.zip
Many improvements to the handling of interfaces in PF.
1) PF should do the right thing when unplugging/replugging or cloning/ destroying NICs. 2) Rules can be loaded in the kernel for not-yet-existing devices (USB, PCMCIA, Cardbus). For example, it is valid to write: "pass in on kue0" before kue USB is plugged in. 3) It is possible to write rules that apply to group of interfaces (drivers), like "pass in on ppp all" 4) There is a new ":peer" modifier that completes the ":broadcast" and ":network" modifiers. 5) There is a new ":0" modifier that will filter out interface aliases. Can also be applied to DNS names to restore original PF behaviour. 6) The dynamic interface syntax (foo) has been vastly improved, and now support multiple addresses, v4 and v6 addresses, and all userland modifiers, like "pass in from (fxp0:network)" 7) Scrub rules now support the !if syntax. 8) States can be bound to the specific interface that created them or to a group of interfaces for example: - pass all keep state (if-bound) - pass all keep state (group-bound) - pass all keep state (floating) 9) The default value when only keep state is given can be selected by using the "set state-policy" statement. 10) "pfctl -ss" will now print the interface scope of the state. This diff change the pf_state structure slighltly, so you should recompile your userland tools (pfctl, authpf, pflogd, tcpdump...) Tested on i386, sparc, sparc64 by Ryan Tested on macppc, sparc64 by Daniel ok deraadt@ mcbride@
Diffstat (limited to 'usr.sbin/tcpdump/print-pfsync.c')
-rw-r--r--usr.sbin/tcpdump/print-pfsync.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-pfsync.c b/usr.sbin/tcpdump/print-pfsync.c
index 076efa4eb21..18b0e233b82 100644
--- a/usr.sbin/tcpdump/print-pfsync.c
+++ b/usr.sbin/tcpdump/print-pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-pfsync.c,v 1.18 2003/12/28 21:06:46 mcbride Exp $ */
+/* $OpenBSD: print-pfsync.c,v 1.19 2003/12/31 11:18:25 cedric Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -28,7 +28,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-pfsync.c,v 1.18 2003/12/28 21:06:46 mcbride Exp $";
+ "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-pfsync.c,v 1.19 2003/12/31 11:18:25 cedric Exp $";
#endif
#include <sys/param.h>
@@ -140,6 +140,7 @@ pfsync_print(struct pfsync_header *hdr, int len)
bzero(&st, sizeof(st));
st.id = s->id;
+ strlcpy(st.u.ifname, s->ifname, sizeof(st.u.ifname));
pf_state_host_ntoh(&s->lan, &st.lan);
pf_state_host_ntoh(&s->gwy, &st.gwy);
pf_state_host_ntoh(&s->ext, &st.ext);