diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
commit | 7585facf05d927eb6df3929ce09ed5e60d905437 (patch) | |
tree | e4d14b4dc180db20356b6b01ce0112f3a2d7897e /src/libcharon/network | |
parent | c1343b3278cdf99533b7902744d15969f9d6fdc1 (diff) | |
download | vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.tar.gz vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.zip |
Imported Upstream version 5.0.2
Diffstat (limited to 'src/libcharon/network')
-rw-r--r-- | src/libcharon/network/receiver.c | 3 | ||||
-rw-r--r-- | src/libcharon/network/receiver.h | 4 | ||||
-rw-r--r-- | src/libcharon/network/sender.c | 6 | ||||
-rw-r--r-- | src/libcharon/network/sender.h | 2 | ||||
-rw-r--r-- | src/libcharon/network/socket.h | 4 | ||||
-rw-r--r-- | src/libcharon/network/socket_manager.c | 2 |
6 files changed, 12 insertions, 9 deletions
diff --git a/src/libcharon/network/receiver.c b/src/libcharon/network/receiver.c index 2f87a5ecb..f683cf818 100644 --- a/src/libcharon/network/receiver.c +++ b/src/libcharon/network/receiver.c @@ -28,7 +28,7 @@ #include <processing/jobs/callback_job.h> #include <crypto/hashers/hasher.h> #include <threading/mutex.h> -#include <utils/packet.h> +#include <networking/packet.h> /** lifetime of a cookie, in seconds */ #define COOKIE_LIFETIME 10 @@ -488,6 +488,7 @@ static job_requeue_t receive_packets(private_receiver_t *this) { DBG1(DBG_NET, "received invalid IKE header from %H - ignored", packet->get_source(packet)); + charon->bus->alert(charon->bus, ALERT_PARSE_ERROR_HEADER, message); message->destroy(message); return JOB_REQUEUE_DIRECT; } diff --git a/src/libcharon/network/receiver.h b/src/libcharon/network/receiver.h index 9e8edee45..58bfe4a96 100644 --- a/src/libcharon/network/receiver.h +++ b/src/libcharon/network/receiver.h @@ -26,8 +26,8 @@ typedef struct receiver_t receiver_t; #include <library.h> -#include <utils/host.h> -#include <utils/packet.h> +#include <networking/host.h> +#include <networking/packet.h> /** * Callback called for any received UDP encapsulated ESP packet. diff --git a/src/libcharon/network/sender.c b/src/libcharon/network/sender.c index 059f24b39..dd8efc1ec 100644 --- a/src/libcharon/network/sender.c +++ b/src/libcharon/network/sender.c @@ -94,10 +94,11 @@ METHOD(sender_t, send_, void, { host_t *src, *dst; - /* if neither source nor destination port is 500 we add a Non-ESP marker */ src = packet->get_source(packet); dst = packet->get_destination(packet); - DBG1(DBG_NET, "sending packet: from %#H to %#H", src, dst); + + DBG1(DBG_NET, "sending packet: from %#H to %#H (%zu bytes)", src, dst, + packet->get_data(packet).len); if (this->send_delay) { @@ -120,6 +121,7 @@ METHOD(sender_t, send_, void, message->destroy(message); } + /* if neither source nor destination port is 500 we add a Non-ESP marker */ if (dst->get_port(dst) != IKEV2_UDP_PORT && src->get_port(src) != IKEV2_UDP_PORT) { diff --git a/src/libcharon/network/sender.h b/src/libcharon/network/sender.h index 9b5c325cc..080559b89 100644 --- a/src/libcharon/network/sender.h +++ b/src/libcharon/network/sender.h @@ -26,7 +26,7 @@ typedef struct sender_t sender_t; #include <library.h> -#include <utils/packet.h> +#include <networking/packet.h> /** * Callback job responsible for sending IKE packets over the socket. diff --git a/src/libcharon/network/socket.h b/src/libcharon/network/socket.h index b8850c6ed..f6c8a8660 100644 --- a/src/libcharon/network/socket.h +++ b/src/libcharon/network/socket.h @@ -27,8 +27,8 @@ typedef struct socket_t socket_t; #include <library.h> -#include <utils/packet.h> -#include <utils/enumerator.h> +#include <networking/packet.h> +#include <collections/enumerator.h> #include <plugins/plugin.h> /** diff --git a/src/libcharon/network/socket_manager.c b/src/libcharon/network/socket_manager.c index d2736de8e..bf1fe5ba2 100644 --- a/src/libcharon/network/socket_manager.c +++ b/src/libcharon/network/socket_manager.c @@ -20,7 +20,7 @@ #include <daemon.h> #include <threading/thread.h> #include <threading/rwlock.h> -#include <utils/linked_list.h> +#include <collections/linked_list.h> typedef struct private_socket_manager_t private_socket_manager_t; |