Do not update remote host if we are behind a NAT.

This commit is contained in:
Tobias Brunner
2010-10-12 11:11:04 +02:00
parent e6f685b0fa
commit d5bd775126
+2 -4
View File
@@ -857,10 +857,8 @@ METHOD(ike_sa_t, update_hosts, void,
if (!other->equals(other, this->other_host)) if (!other->equals(other, this->other_host))
{ {
/* update others adress if we are NOT NATed, /* update others adress if we are NOT NATed */
* and allow port changes if we are NATed */ if (!has_condition(this, COND_NAT_HERE))
if (!has_condition(this, COND_NAT_HERE) ||
other->ip_equals(other, this->other_host))
{ {
set_other_host(this, other->clone(other)); set_other_host(this, other->clone(other));
update = TRUE; update = TRUE;