diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-29 01:03:02 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-29 01:03:02 +0000 |
commit | 98bf2f62e44cf563d022f37f3eca2cd7faca192a (patch) | |
tree | af61da47ed175b9e43c847700195f58c27237976 /sys/netinet/ip_ipsp.c | |
parent | c48b5769e25ba769c434ebaa0c05fa73afd6d474 (diff) |
Add ipsp_skipcrypto_{mark,unmark}()
Diffstat (limited to 'sys/netinet/ip_ipsp.c')
-rw-r--r-- | sys/netinet/ip_ipsp.c | 28 |
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); +} |