From d3fbc75e85566cc69108f0a244a73388f397a161 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Thu, 26 Mar 2009 11:49:07 +0000 Subject: [PATCH] set port for NATD hash calculation in the "include-all" case --- src/charon/sa/tasks/ike_natd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/charon/sa/tasks/ike_natd.c b/src/charon/sa/tasks/ike_natd.c index b35ddf47f3..a20af7ce7b 100644 --- a/src/charon/sa/tasks/ike_natd.c +++ b/src/charon/sa/tasks/ike_natd.c @@ -356,7 +356,11 @@ static status_t build_i(private_ike_natd_t *this, message_t *message) charon->kernel_interface, FALSE, FALSE); while (enumerator->enumerate(enumerator, (void**)&host)) { + /* apply port 500 to host, but work on a copy */ + host = host->clone(host); + host->set_port(host, IKEV2_UDP_PORT); notify = build_natd_payload(this, NAT_DETECTION_SOURCE_IP, host); + host->destroy(host); message->add_payload(message, (payload_t*)notify); } enumerator->destroy(enumerator);