summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ipsp.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-05-29 01:03:02 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-05-29 01:03:02 +0000
commit98bf2f62e44cf563d022f37f3eca2cd7faca192a (patch)
treeaf61da47ed175b9e43c847700195f58c27237976 /sys/netinet/ip_ipsp.c
parentc48b5769e25ba769c434ebaa0c05fa73afd6d474 (diff)
Add ipsp_skipcrypto_{mark,unmark}()
Diffstat (limited to 'sys/netinet/ip_ipsp.c')
-rw-r--r--sys/netinet/ip_ipsp.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c
index 2ac5ec5b22f..857aa955834 100644
--- a/sys/netinet/ip_ipsp.c
+++ b/sys/netinet/ip_ipsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.c,v 1.117 2001/05/27 05:16:32 angelos Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.118 2001/05/29 01:03:00 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -1248,3 +1248,29 @@ ipsp_reffree(struct ipsec_ref *ipr)
if (--ipr->ref_count <= 0)
FREE(ipr, ipr->ref_malloctype);
}
+
+/* Mark a TDB as TDBF_SKIPCRYPTO. */
+void
+ipsp_skipcrypto_mark(struct tdb_ident *tdbi)
+{
+ struct tdb *tdb;
+ int s = spltdb();
+
+ tdb = gettdb(tdbi->spi, &tdbi->dst, tdbi->proto);
+ if (tdb != NULL)
+ tdb->tdb_flags |= TDBF_SKIPCRYPTO;
+ splx(s);
+}
+
+/* Unmark a TDB as TDBF_SKIPCRYPTO. */
+void
+ipsp_skipcrypto_unmark(struct tdb_ident *tdbi)
+{
+ struct tdb *tdb;
+ int s = spltdb();
+
+ tdb = gettdb(tdbi->spi, &tdbi->dst, tdbi->proto);
+ if (tdb != NULL)
+ tdb->tdb_flags &= ~TDBF_SKIPCRYPTO;
+ splx(s);
+}