Fix traffic selectors also as initiator in case of transport mode over NAT

This commit is contained in:
Tobias Brunner
2012-12-13 15:27:29 +01:00
parent 2990671748
commit 283898d6e0
+1 -1
View File
@@ -561,7 +561,7 @@ static bool get_ts(private_quick_mode_t *this, message_t *message)
tsr = traffic_selector_create_from_subnet(hsr->clone(hsr),
hsr->get_family(hsr) == AF_INET ? 32 : 128, 0, 0);
}
if (!this->initiator && this->mode == MODE_TRANSPORT && this->udp &&
if (this->mode == MODE_TRANSPORT && this->udp &&
(!tsi->is_host(tsi, hsi) || !tsr->is_host(tsr, hsr)))
{ /* change TS in case of a NAT in transport mode */
DBG2(DBG_IKE, "changing received traffic selectors %R=== %R due to NAT",