diff options
author | 2004-08-23 11:53:24 +0000 | |
---|---|---|
committer | 2004-08-23 11:53:24 +0000 | |
commit | 5fc21c4137140d29562b8c687f5fc73eca1b4bc6 (patch) | |
tree | 4fee661f4dd0c7a7ced93674e9c56ab8d668ac1b | |
parent | typo, spotted by Martin.Kraemer AT Fujitsu-Siemens.com; ok markus (diff) | |
download | wireguard-openbsd-5fc21c4137140d29562b8c687f5fc73eca1b4bc6.tar.xz wireguard-openbsd-5fc21c4137140d29562b8c687f5fc73eca1b4bc6.zip |
We need to set sa->initiator before checking if the newly created SA
replaces an old one, or the id_i/id_r check will mismatch. Previous
behaviour was mostly harmless, but wasted some resources (until normal
SA expiration). hshoexer@ "haven't tried, but think it's ok"
-rw-r--r-- | sbin/isakmpd/exchange.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c index 2deec9cc793..bf698eb5e95 100644 --- a/sbin/isakmpd/exchange.c +++ b/sbin/isakmpd/exchange.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exchange.c,v 1.102 2004/08/10 15:59:10 ho Exp $ */ +/* $OpenBSD: exchange.c,v 1.103 2004/08/23 11:53:24 ho Exp $ */ /* $EOM: exchange.c,v 1.143 2000/12/04 00:02:25 angelos Exp $ */ /* @@ -1399,6 +1399,7 @@ exchange_finalize(struct message *msg) * Locate any old SAs and mark them replaced * (SA_FLAG_REPLACED). */ + sa->initiator = exchange->initiator; while ((old_sa = sa_find(exchange_check_old_sa, sa)) != 0) sa_mark_replaced(old_sa); |