aboutsummaryrefslogtreecommitdiffstats
path: root/src/pluto/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pluto/state.c')
-rw-r--r--src/pluto/state.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/pluto/state.c b/src/pluto/state.c
index c506ebc5b..56c66675a 100644
--- a/src/pluto/state.c
+++ b/src/pluto/state.c
@@ -537,16 +537,10 @@ duplicate_state(struct state *st)
nst->st_clonedfrom = st->st_serialno;
nst->st_oakley = st->st_oakley;
nst->st_modecfg = st->st_modecfg;
-
-# define clone_chunk(ch) \
- clonetochunk(nst->ch, st->ch.ptr, st->ch.len)
-
- clone_chunk(st_skeyid_d);
- clone_chunk(st_skeyid_a);
- clone_chunk(st_skeyid_e);
- clone_chunk(st_enc_key);
-
-# undef clone_chunk
+ nst->st_skeyid_d = chunk_clone(st->st_skeyid_d);
+ nst->st_skeyid_a = chunk_clone(st->st_skeyid_a);
+ nst->st_skeyid_e = chunk_clone(st->st_skeyid_e);
+ nst->st_enc_key = chunk_clone(st->st_enc_key);
return nst;
}