summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_ipcomp.c
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2014-07-09 09:30:49 +0000
committerhenning <henning@openbsd.org>2014-07-09 09:30:49 +0000
commit73a8458fa4387bba17d1426fbdadd6ce955f6ecd (patch)
treeb0a9e43b5405aae9be66e2ec2b707bf70ae8857e /sys/netinet/ip_ipcomp.c
parentKill more FIPS tentacles by removing the private_AES_set_{enc,dec}rypt_key() (diff)
downloadwireguard-openbsd-73a8458fa4387bba17d1426fbdadd6ce955f6ecd.tar.xz
wireguard-openbsd-73a8458fa4387bba17d1426fbdadd6ce955f6ecd.zip
bpf code surgery / shuffling / simplification.
the various bpf_mtap_* are very similiar, they differ in what (and to some extent how) they prepend something, and what copy function they pass to bpf_catchpacket. use an internal _bpf_mtap as "backend" for bpf_mtap and friends. extend bpf_mtap_hdr so that it covers all common cases: if dlen is 0, nothing gets prepended. copy function can be given, if NULL the default bpf_mcopy is used. adjust the existing bpf_mtap_hdr users to pass a NULL ptr for the copy fn. re-implement bpf_mtap_af as simple wrapper for bpf_mtap_hdr. re-implement bpf_mtap_ether using bpf_map_hdr re-implement bpf_mtap_pflog as trivial bpf_mtap_hdr wrapper ok bluhm benno
Diffstat (limited to 'sys/netinet/ip_ipcomp.c')
-rw-r--r--sys/netinet/ip_ipcomp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c
index f0dba810a49..6e753eb8d51 100644
--- a/sys/netinet/ip_ipcomp.c
+++ b/sys/netinet/ip_ipcomp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipcomp.c,v 1.33 2014/01/09 06:29:06 tedu Exp $ */
+/* $OpenBSD: ip_ipcomp.c,v 1.34 2014/07/09 09:30:49 henning Exp $ */
/*
* Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org)
@@ -402,7 +402,7 @@ ipcomp_output(m, tdb, mp, skip, protoff)
hdr.spi = tdb->tdb_spi;
bpf_mtap_hdr(encif->if_bpf, (char *)&hdr,
- ENC_HDRLEN, m, BPF_DIRECTION_OUT);
+ ENC_HDRLEN, m, BPF_DIRECTION_OUT, NULL);
}
}
#endif