diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-07-07 22:05:07 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-07-07 22:05:07 +0000 |
commit | cb72519ca1b1e15f46007503c1d0baa45b0534bd (patch) | |
tree | cfe7831e71116859760c88835d3c07371e6fa0cc /sbin | |
parent | 65805e6e70ac7077734b9eac7230547eb34d725c (diff) |
Merge with EOM 1.108
author: ho
Connection names only match phase 2 exchanges, so let a
phase 2 stayalive imply stayalive of the "parent" ISAKMP SA.
author: ho
'Connections' should stay alive (SA_FLAG_STAYALIVE)
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/isakmpd/exchange.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c index eb097b4b343..cdc1ae59f05 100644 --- a/sbin/isakmpd/exchange.c +++ b/sbin/isakmpd/exchange.c @@ -1,5 +1,5 @@ -/* $OpenBSD: exchange.c,v 1.21 1999/06/02 06:33:00 niklas Exp $ */ -/* $EOM: exchange.c,v 1.106 1999/05/21 14:12:57 ho Exp $ */ +/* $OpenBSD: exchange.c,v 1.22 1999/07/07 22:05:06 niklas Exp $ */ +/* $EOM: exchange.c,v 1.108 1999/06/06 17:48:30 ho Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -45,6 +45,7 @@ #include "cert.h" #include "conf.h" +#include "connection.h" #include "constants.h" #include "cookie.h" #include "crypto.h" @@ -1271,6 +1272,15 @@ exchange_finalize (struct message *msg) sa->flags |= sa_flag (attr->field); conf_free_list (attrs); } + /* 'Connections' should stay alive. */ + if (connection_exist (exchange->name)) + { + sa->flags |= SA_FLAG_STAYALIVE; + + /* ISAKMP SA of this connection should also stay alive. */ + if (exchange->phase == 2 && msg->isakmp_sa) + msg->isakmp_sa->flags |= SA_FLAG_STAYALIVE; + } } sa->exch_type = exchange->type; |