summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobhe <tobhe@openbsd.org>2021-01-18 01:23:53 +0000
committertobhe <tobhe@openbsd.org>2021-01-18 01:23:53 +0000
commita533d8bda18e92b7970b54ce27980852063b09c1 (patch)
tree6714eb8cd74e017d4c19fe23a68e1488ca363550
parentMove sessid definition to keynote-verify.c to avoid issues with -fno-common (diff)
downloadwireguard-openbsd-a533d8bda18e92b7970b54ce27980852063b09c1.tar.xz
wireguard-openbsd-a533d8bda18e92b7970b54ce27980852063b09c1.zip
Sync SA configuration payload to new SA after IKE SA rekeying.
-rw-r--r--sbin/iked/ikev2.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c
index d9a086bd9aa..c32c3a184fa 100644
--- a/sbin/iked/ikev2.c
+++ b/sbin/iked/ikev2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2.c,v 1.293 2020/12/27 21:07:31 tobhe Exp $ */
+/* $OpenBSD: ikev2.c,v 1.294 2021/01/18 01:23:53 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -4362,6 +4362,11 @@ ikev2_ikesa_enable(struct iked *env, struct iked_sa *sa, struct iked_sa *nsa)
sa->sa_addrpool6 = NULL;
RB_INSERT(iked_addrpool6, &env->sc_addrpool6, nsa);
}
+ nsa->sa_cp = sa->sa_cp;
+ nsa->sa_cp_addr = sa->sa_cp_addr;
+ sa->sa_cp_addr = NULL;
+ nsa->sa_cp_addr6 = sa->sa_cp_addr6;
+ sa->sa_cp_addr6 = NULL;
/* Transfer other attributes */
if (sa->sa_dstid_entry_valid) {
sa_dstid_remove(env, sa);