aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2007-09-12 11:11:10 +0000
committerMartin Willi <martin@strongswan.org>2007-09-12 11:11:10 +0000
commitdd5299306859e0c0fc1ccc8a7090e07d47867ce0 (patch)
tree3e3a14b1a7132aaaa8d4c40ffc90116d13a2869f /src
parentb5816842f98219be063297cd7bec10c5c1c854df (diff)
downloadstrongswan-dd5299306859e0c0fc1ccc8a7090e07d47867ce0.tar.bz2
strongswan-dd5299306859e0c0fc1ccc8a7090e07d47867ce0.tar.xz
only switch to port 4500 if we are on 500: fixed reauthentication in NAT
scenarios
Diffstat (limited to 'src')
-rw-r--r--src/charon/sa/tasks/ike_natd.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/charon/sa/tasks/ike_natd.c b/src/charon/sa/tasks/ike_natd.c
index 3c530d218..eea769138 100644
--- a/src/charon/sa/tasks/ike_natd.c
+++ b/src/charon/sa/tasks/ike_natd.c
@@ -232,10 +232,17 @@ static status_t process_i(private_ike_natd_t *this, message_t *message)
{
host_t *me, *other;
+ /* do not switch if we have a custom port from mobike/NAT */
me = this->ike_sa->get_my_host(this->ike_sa);
- me->set_port(me, IKEV2_NATT_PORT);
+ if (me->get_port(me) == IKEV2_UDP_PORT)
+ {
+ me->set_port(me, IKEV2_NATT_PORT);
+ }
other = this->ike_sa->get_other_host(this->ike_sa);
- other->set_port(other, IKEV2_NATT_PORT);
+ if (other->get_port(other) == IKEV2_UDP_PORT)
+ {
+ other->set_port(other, IKEV2_NATT_PORT);
+ }
}
}