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 | |
parent | c48b5769e25ba769c434ebaa0c05fa73afd6d474 (diff) |
Add ipsp_skipcrypto_{mark,unmark}()
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_ipsp.c | 28 | ||||
-rw-r--r-- | sys/netinet/ip_ipsp.h | 4 |
2 files changed, 30 insertions, 2 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); +} diff --git a/sys/netinet/ip_ipsp.h b/sys/netinet/ip_ipsp.h index 42a8d903c8a..38612515d3a 100644 --- a/sys/netinet/ip_ipsp.h +++ b/sys/netinet/ip_ipsp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.h,v 1.91 2001/05/27 05:17:07 angelos Exp $ */ +/* $OpenBSD: ip_ipsp.h,v 1.92 2001/05/29 01:03:01 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -595,5 +595,7 @@ extern void ipsp_delete_acquire(struct ipsec_acquire *); extern void ipsp_clear_acquire(struct tdb *); extern int ipsp_is_unspecified(union sockaddr_union); extern void ipsp_reffree(struct ipsec_ref *); +extern void ipsp_skipcrypto_unmark(struct tdb_ident *); +extern void ipsp_skipcrypto_mark(struct tdb_ident *); #endif /* _KERNEL */ #endif /* _NETINET_IPSP_H_ */ |