summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ah_old.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1998-05-18 21:11:13 +0000
committerNiels Provos <provos@cvs.openbsd.org>1998-05-18 21:11:13 +0000
commit0a99f14607ee1c61291cc2ef2b27e12fa8150b57 (patch)
tree16d9ebdb669b92f649893f48e323f5efe1f65f1c /sys/netinet/ip_ah_old.c
parent32b196f4e8de3c9182f2326dab7a9409ca8e45ad (diff)
first step to the setsockopt/getsockopt interface as described in
draft-mcdonald-simple-ipsec-api, kernel notifies (EMT_REQUESTSA) signal userland key management applications when security services are requested. this is only for outgoing connections at the moment, incoming packets are not yet checked against the selected socket policy.
Diffstat (limited to 'sys/netinet/ip_ah_old.c')
-rw-r--r--sys/netinet/ip_ah_old.c44
1 files changed, 25 insertions, 19 deletions
diff --git a/sys/netinet/ip_ah_old.c b/sys/netinet/ip_ah_old.c
index 5ecfbb0b3e1..c93f46a6a2d 100644
--- a/sys/netinet/ip_ah_old.c
+++ b/sys/netinet/ip_ah_old.c
@@ -1,27 +1,33 @@
-/* $OpenBSD: ip_ah_old.c,v 1.13 1998/03/18 10:16:27 provos Exp $ */
+/* $OpenBSD: ip_ah_old.c,v 1.14 1998/05/18 21:10:34 provos Exp $ */
/*
- * The author of this code is John Ioannidis, ji@tla.org,
- * (except when noted otherwise).
+ * The authors of this code are John Ioannidis (ji@tla.org),
+ * Angelos D. Keromytis (kermit@csd.uch.gr) and
+ * Niels Provos (provos@physnet.uni-hamburg.de).
*
- * This code was written for BSD/OS in Athens, Greece, in November 1995.
+ * This code was written by John Ioannidis for BSD/OS in Athens, Greece,
+ * in November 1995.
*
* Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis, kermit@forthnet.gr.
+ * by Angelos D. Keromytis.
*
- * Additional transforms and features in 1997 by Angelos D. Keromytis and
- * Niels Provos.
+ * Additional transforms and features in 1997 and 1998 by Angelos D. Keromytis
+ * and Niels Provos.
*
- * Copyright (C) 1995, 1996, 1997 by John Ioannidis, Angelos D. Keromytis
+ * Copyright (C) 1995, 1996, 1997, 1998 by John Ioannidis, Angelos D. Keromytis
* and Niels Provos.
*
* Permission to use, copy, and modify this software without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
- * modification of this software.
+ * modification of this software.
+ * You may use this code under the GNU public license if you so wish. Please
+ * contribute changes back to the authors under this freer than GPL license
+ * so that we may further the use of strong encryption without limitations to
+ * all.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NEITHER AUTHOR MAKES ANY
+ * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
* MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
* PURPOSE.
@@ -64,7 +70,7 @@
#include <netinet/ip_ah.h>
#include <sys/syslog.h>
-extern void encap_sendnotify(int, struct tdb *);
+extern void encap_sendnotify(int, struct tdb *, void *);
struct ah_hash ah_old_hash[] = {
{ ALG_AUTH_MD5, "Keyed MD5",
@@ -414,14 +420,14 @@ ah_old_input(struct mbuf *m, struct tdb *tdb)
{
if (tdb->tdb_cur_packets >= tdb->tdb_soft_packets)
{
- encap_sendnotify(NOTIFY_SOFT_EXPIRE, tdb);
+ encap_sendnotify(NOTIFY_SOFT_EXPIRE, tdb, NULL);
tdb->tdb_flags &= ~TDBF_SOFT_PACKETS;
}
else
if (tdb->tdb_flags & TDBF_SOFT_BYTES)
if (tdb->tdb_cur_bytes >= tdb->tdb_soft_bytes)
{
- encap_sendnotify(NOTIFY_SOFT_EXPIRE, tdb);
+ encap_sendnotify(NOTIFY_SOFT_EXPIRE, tdb, NULL);
tdb->tdb_flags &= ~TDBF_SOFT_BYTES;
}
}
@@ -430,14 +436,14 @@ ah_old_input(struct mbuf *m, struct tdb *tdb)
{
if (tdb->tdb_cur_packets >= tdb->tdb_exp_packets)
{
- encap_sendnotify(NOTIFY_HARD_EXPIRE, tdb);
+ encap_sendnotify(NOTIFY_HARD_EXPIRE, tdb, NULL);
tdb_delete(tdb, 0);
}
else
if (tdb->tdb_flags & TDBF_BYTES)
if (tdb->tdb_cur_bytes >= tdb->tdb_exp_bytes)
{
- encap_sendnotify(NOTIFY_HARD_EXPIRE, tdb);
+ encap_sendnotify(NOTIFY_HARD_EXPIRE, tdb, NULL);
tdb_delete(tdb, 0);
}
}
@@ -645,14 +651,14 @@ ah_old_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb,
{
if (tdb->tdb_cur_packets >= tdb->tdb_soft_packets)
{
- encap_sendnotify(NOTIFY_SOFT_EXPIRE, tdb);
+ encap_sendnotify(NOTIFY_SOFT_EXPIRE, tdb, NULL);
tdb->tdb_flags &= ~TDBF_SOFT_PACKETS;
}
else
if (tdb->tdb_flags & TDBF_SOFT_BYTES)
if (tdb->tdb_cur_bytes >= tdb->tdb_soft_bytes)
{
- encap_sendnotify(NOTIFY_SOFT_EXPIRE, tdb);
+ encap_sendnotify(NOTIFY_SOFT_EXPIRE, tdb, NULL);
tdb->tdb_flags &= ~TDBF_SOFT_BYTES;
}
}
@@ -661,14 +667,14 @@ ah_old_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb,
{
if (tdb->tdb_cur_packets >= tdb->tdb_exp_packets)
{
- encap_sendnotify(NOTIFY_HARD_EXPIRE, tdb);
+ encap_sendnotify(NOTIFY_HARD_EXPIRE, tdb, NULL);
tdb_delete(tdb, 0);
}
else
if (tdb->tdb_flags & TDBF_BYTES)
if (tdb->tdb_cur_bytes >= tdb->tdb_exp_bytes)
{
- encap_sendnotify(NOTIFY_HARD_EXPIRE, tdb);
+ encap_sendnotify(NOTIFY_HARD_EXPIRE, tdb, NULL);
tdb_delete(tdb, 0);
}
}