summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-27 00:48:22 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-27 00:48:22 +0000
commitc5355883f033c52fa97b73febb89e80adf21cbbd (patch)
treec8543628afe06e7d3cc1c6e8d95b914bca75fa23 /sbin/isakmpd
parente124911f2077dbdfebb2ca7148eca54d747a3675 (diff)
Keep track of the ACQUIRE sequence number, and pass it to the kernel
along with the ADD message.
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/exchange.c3
-rw-r--r--sbin/isakmpd/pf_key_v2.c4
-rw-r--r--sbin/isakmpd/sa.h5
3 files changed, 8 insertions, 4 deletions
diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c
index 14534d05b0a..8e1a9727446 100644
--- a/sbin/isakmpd/exchange.c
+++ b/sbin/isakmpd/exchange.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exchange.c,v 1.50 2001/06/05 10:14:56 angelos Exp $ */
+/* $OpenBSD: exchange.c,v 1.51 2001/06/27 00:48:21 angelos Exp $ */
/* $EOM: exchange.c,v 1.143 2000/12/04 00:02:25 angelos Exp $ */
/*
@@ -1339,6 +1339,7 @@ exchange_finalize (struct message *msg)
}
}
+ sa->seq = exchange->seq;
sa->exch_type = exchange->type;
}
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c
index ec62e5a468a..01983762168 100644
--- a/sbin/isakmpd/pf_key_v2.c
+++ b/sbin/isakmpd/pf_key_v2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_key_v2.c,v 1.65 2001/06/07 07:50:29 angelos Exp $ */
+/* $OpenBSD: pf_key_v2.c,v 1.66 2001/06/27 00:48:21 angelos Exp $ */
/* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */
/*
@@ -915,7 +915,7 @@ pf_key_v2_set_spi (struct sa *sa, struct proto *proto, int incoming,
dst, dstlen)
: 0);
#else
- msg.sadb_msg_seq = 0;
+ msg.sadb_msg_seq = sa->seq;
#endif
update = pf_key_v2_msg_new (&msg, 0);
if (!update)
diff --git a/sbin/isakmpd/sa.h b/sbin/isakmpd/sa.h
index 94d7f2b676b..09427f05886 100644
--- a/sbin/isakmpd/sa.h
+++ b/sbin/isakmpd/sa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sa.h,v 1.23 2001/06/12 21:50:36 niklas Exp $ */
+/* $OpenBSD: sa.h,v 1.24 2001/06/27 00:48:21 angelos Exp $ */
/* $EOM: sa.h,v 1.58 2000/10/10 12:39:01 provos Exp $ */
/*
@@ -179,6 +179,9 @@ struct sa {
u_int64_t seconds;
u_int64_t kilobytes;
+ /* ACQUIRE sequence number */
+ u_int32_t seq;
+
/* The events that will occur when an SA has timed out. */
struct event *soft_death;
struct event *death;