From e7ea057fd2da33ff5b55e1cebb3b5b7e361a43d7 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 13 Feb 2012 18:04:04 +0100 Subject: Make the UDP ports charon listens for packets on (and uses as source ports) configurable. --- src/libcharon/daemon.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/libcharon/daemon.h') diff --git a/src/libcharon/daemon.h b/src/libcharon/daemon.h index f42a9f078..b67de77b8 100644 --- a/src/libcharon/daemon.h +++ b/src/libcharon/daemon.h @@ -178,15 +178,30 @@ typedef struct daemon_t daemon_t; #define DEFAULT_THREADS 16 /** - * UDP Port on which the daemon will listen for incoming traffic. + * Primary UDP port used by IKE. */ #define IKEV2_UDP_PORT 500 /** - * UDP Port to which the daemon will float to if NAT is detected. + * UDP port defined for use in case a NAT is detected. */ #define IKEV2_NATT_PORT 4500 +/** + * UDP port on which the daemon will listen for incoming traffic (also used as + * source port for outgoing traffic). + */ +#ifndef CHARON_UDP_PORT +#define CHARON_UDP_PORT IKEV2_UDP_PORT +#endif + +/** + * UDP port used by the daemon in case a NAT is detected. + */ +#ifndef CHARON_NATT_PORT +#define CHARON_NATT_PORT IKEV2_NATT_PORT +#endif + /** * Main class of daemon, contains some globals. */ -- cgit v1.2.3