From 061c95b449f5c6ce9ca81eb1f6e8a846a69c447c Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Mon, 29 Mar 2010 17:44:37 +0200 Subject: [PATCH] fixed pluto crash caused by expired leftcert and rightca=%same --- src/pluto/connections.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pluto/connections.c b/src/pluto/connections.c index cd76370992..421dd79b43 100644 --- a/src/pluto/connections.c +++ b/src/pluto/connections.c @@ -1122,11 +1122,11 @@ void add_connection(const whack_message_t *wm) same_leftca = extract_end(&c->spd.this, &wm->left, "left"); same_rightca = extract_end(&c->spd.that, &wm->right, "right"); - if (same_rightca) + if (same_rightca && c->spd.this.ca) { c->spd.that.ca = c->spd.this.ca->clone(c->spd.this.ca); } - else if (same_leftca) + else if (same_leftca && c->spd.that.ca) { c->spd.this.ca = c->spd.that.ca->clone(c->spd.that.ca); } -- 2.47.3