summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ipsec_input.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2003-07-28 10:10:16 +0000
committermarkus <markus@openbsd.org>2003-07-28 10:10:16 +0000
commit8260a36bac424ef5292da7f7df9edddf5390c4ce (patch)
tree666b4202558e313105d4f51800598175aa4cfcfd /sys/netinet/ipsec_input.c
parentSupport for generating Diffie-Hellman groups (/etc/moduli) from ssh-keygen. (diff)
downloadwireguard-openbsd-8260a36bac424ef5292da7f7df9edddf5390c4ce.tar.xz
wireguard-openbsd-8260a36bac424ef5292da7f7df9edddf5390c4ce.zip
allow gif(4) over ipsec: mark mbuf for transport mode SA,
so in_gif_input can detect whether a proto 4 header is due to ipsec tunnel mode or gif(4) encapsulation; fixes pr 3023 ok itojun@. provos@ and angelos@ agree; tested by sturm@
Diffstat (limited to 'sys/netinet/ipsec_input.c')
-rw-r--r--sys/netinet/ipsec_input.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c
index 9a8545fd98a..d4282c826ab 100644
--- a/sys/netinet/ipsec_input.c
+++ b/sys/netinet/ipsec_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec_input.c,v 1.68 2003/07/24 11:13:47 markus Exp $ */
+/* $OpenBSD: ipsec_input.c,v 1.69 2003/07/28 10:10:16 markus Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -548,6 +548,9 @@ ipsec_common_input_cb(struct mbuf *m, struct tdb *tdbp, int skip, int protoff,
else
m->m_flags |= M_AUTH | M_AUTH_AH;
+ if (tdbp->tdb_flags & TDBF_TUNNELING)
+ m->m_flags |= M_TUNNEL;
+
#if NBPFILTER > 0
bpfif = &encif[0].sc_if;
if (bpfif->if_bpf) {