diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-02-13 18:04:04 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-08-08 15:07:43 +0200 |
commit | e7ea057fd2da33ff5b55e1cebb3b5b7e361a43d7 (patch) | |
tree | 14fe49f6b232070a56b4a8ed6d9db9b7240b7ad6 /src/libcharon/plugins/stroke/stroke_config.c | |
parent | 73940eb71235f8ff8c3490d9f607db9c7defd19e (diff) | |
download | strongswan-e7ea057fd2da33ff5b55e1cebb3b5b7e361a43d7.tar.bz2 strongswan-e7ea057fd2da33ff5b55e1cebb3b5b7e361a43d7.tar.xz |
Make the UDP ports charon listens for packets on (and uses as source ports) configurable.
Diffstat (limited to 'src/libcharon/plugins/stroke/stroke_config.c')
-rw-r--r-- | src/libcharon/plugins/stroke/stroke_config.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_config.c b/src/libcharon/plugins/stroke/stroke_config.c index c884da05d..83f04bd38 100644 --- a/src/libcharon/plugins/stroke/stroke_config.c +++ b/src/libcharon/plugins/stroke/stroke_config.c @@ -188,6 +188,7 @@ static ike_cfg_t *build_ike_cfg(private_stroke_config_t *this, stroke_msg_t *msg ike_cfg_t *ike_cfg; char *interface; host_t *host; + u_int16_t ikeport; host = host_create_from_dns(msg->add_conn.other.address, 0, 0); if (host) @@ -224,11 +225,13 @@ static ike_cfg_t *build_ike_cfg(private_stroke_config_t *this, stroke_msg_t *msg } } } + ikeport = msg->add_conn.me.ikeport; + ikeport = (ikeport == IKEV2_UDP_PORT) ? CHARON_UDP_PORT : ikeport; ike_cfg = ike_cfg_create(msg->add_conn.other.sendcert != CERT_NEVER_SEND, msg->add_conn.force_encap, msg->add_conn.me.address, msg->add_conn.me.allow_any, - msg->add_conn.me.ikeport, + ikeport, msg->add_conn.other.address, msg->add_conn.other.allow_any, msg->add_conn.other.ikeport); |