summaryrefslogtreecommitdiff
path: root/sbin/ipsecctl/ike.c
diff options
context:
space:
mode:
authorMathieu Sauve-Frankel <msf@cvs.openbsd.org>2006-12-18 00:08:05 +0000
committerMathieu Sauve-Frankel <msf@cvs.openbsd.org>2006-12-18 00:08:05 +0000
commitd51e9fdf93b1daf1fc559f96aebc2f5d31d86833 (patch)
tree3861f14e281f2a1064c8495539ac161d0bb37864 /sbin/ipsecctl/ike.c
parent92e0563326c9b6cf5b1328b741ea6481c373fe82 (diff)
call ike_setup_ids from a more appropriate location.
ok hshoexer@
Diffstat (limited to 'sbin/ipsecctl/ike.c')
-rw-r--r--sbin/ipsecctl/ike.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/ipsecctl/ike.c b/sbin/ipsecctl/ike.c
index 2816d289af5..62a628571d3 100644
--- a/sbin/ipsecctl/ike.c
+++ b/sbin/ipsecctl/ike.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ike.c,v 1.58 2006/11/30 21:35:34 markus Exp $ */
+/* $OpenBSD: ike.c,v 1.59 2006/12/18 00:08:04 msf Exp $ */
/*
* Copyright (c) 2005 Hans-Joerg Hoexer <hshoexer@openbsd.org>
*
@@ -578,6 +578,7 @@ ike_connect(struct ipsec_rule *r, FILE *fd)
static int
ike_gen_config(struct ipsec_rule *r, FILE *fd)
{
+ ike_setup_ids(r);
ike_section_general(r, fd);
ike_section_peer(r, fd);
if (ike_section_p1(r, fd) == -1) {
@@ -598,6 +599,7 @@ ike_gen_config(struct ipsec_rule *r, FILE *fd)
static int
ike_delete_config(struct ipsec_rule *r, FILE *fd)
{
+ ike_setup_ids(r);
#if 0
switch (r->ikemode) {
case IKE_ACTIVE:
@@ -683,7 +685,6 @@ ike_setup_ids(struct ipsec_rule *r)
int
ike_print_config(struct ipsec_rule *r, int opts)
{
- ike_setup_ids(r);
if (opts & IPSECCTL_OPT_DELETE)
return (ike_delete_config(r, stdout));
else