]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Check if a config has been selected before narrowing selectors in quick mode
authorMartin Willi <martin@revosec.ch>
Tue, 20 Dec 2011 10:15:15 +0000 (11:15 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:31:28 +0000 (17:31 +0100)
src/libcharon/sa/ikev1/tasks/quick_mode.c

index 9e71642af23448975e3721c25f54df2bcd04e23c..df7b6375ff30feb36d430497b134715cde755f4a 100644 (file)
@@ -697,8 +697,11 @@ METHOD(task_t, process_r, status_t,
                        this->tsi = this->tsr = NULL;
                        this->config = peer_cfg->select_child_cfg(peer_cfg, tsr, tsi,
                                                                                                          me, other);
-                       this->tsi = select_ts(this, FALSE, tsi);
-                       this->tsr = select_ts(this, TRUE, tsr);
+                       if (this->config)
+                       {
+                               this->tsi = select_ts(this, FALSE, tsi);
+                               this->tsr = select_ts(this, TRUE, tsr);
+                       }
                        tsi->destroy_offset(tsi, offsetof(traffic_selector_t, destroy));
                        tsr->destroy_offset(tsr, offsetof(traffic_selector_t, destroy));
                        if (!this->config)