diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2006-06-15 16:57:25 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2006-06-15 16:57:25 +0000 |
commit | 089d5a08946bfffe50eb9676a7773a8dedcc6128 (patch) | |
tree | 23e29dab6caad6fbda813fd0970f471a8bb10a71 /sbin/ipsecctl | |
parent | 76df8e5b0f5b64f80edc3988c2c84757ae779f94 (diff) |
be careful when touch the peer component of a rule. It is not
necessarily set anymore, as now the peer can be left out.
Diffstat (limited to 'sbin/ipsecctl')
-rw-r--r-- | sbin/ipsecctl/ike.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/ipsecctl/ike.c b/sbin/ipsecctl/ike.c index 2346f64a782..667fe367e71 100644 --- a/sbin/ipsecctl/ike.c +++ b/sbin/ipsecctl/ike.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ike.c,v 1.42 2006/06/13 16:13:41 naddy Exp $ */ +/* $OpenBSD: ike.c,v 1.43 2006/06/15 16:57:24 hshoexer Exp $ */ /* * Copyright (c) 2005 Hans-Joerg Hoexer <hshoexer@openbsd.org> * @@ -549,7 +549,10 @@ ike_delete_config(struct ipsec_rule *r, FILE *fd) return (-1); } - fprintf(fd, DELETE "[peer-%s]\n", r->peer->name); + if (r->peer) { + fprintf(fd, DELETE "[peer-%s]\n", r->peer->name); + fprintf(fd, DELETE "[mm-%s]\n", r->peer->name); + } if (r->auth) { if (r->auth->srcid) fprintf(fd, DELETE "[%s-ID]\n", r->auth->srcid); @@ -558,7 +561,6 @@ ike_delete_config(struct ipsec_rule *r, FILE *fd) } fprintf(fd, DELETE "[IPsec-%s-%s]\n", r->src->name, r->dst->name); fprintf(fd, DELETE "[qm-%s-%s]\n", r->src->name, r->dst->name); - fprintf(fd, DELETE "[mm-%s]\n", r->peer->name); fprintf(fd, DELETE "[lid-%s]\n", r->src->name); fprintf(fd, DELETE "[rid-%s]\n", r->dst->name); |