diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-08-13 10:39:34 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-08-13 10:45:39 +0200 |
commit | e4ef4c9877d5ccb773ace0edf655351428c39572 (patch) | |
tree | 9b3349ad0cafc1acebafb2ff2dc78a031f28c555 /src/libhydra/kernel/kernel_interface.c | |
parent | 000668d3081422a3ac06fe16f038a4b1d6700f96 (diff) | |
parent | 6fbf4472ea785f3c75d278b1a7400534989bf26a (diff) | |
download | strongswan-e4ef4c9877d5ccb773ace0edf655351428c39572.tar.bz2 strongswan-e4ef4c9877d5ccb773ace0edf655351428c39572.tar.xz |
Merge branch 'android-ndk'
This branch comes with some preliminary changes for the user-land IPsec
implementation and the Android App.
One important change is that the UDP ports used by the socket-default plugin
were made configurable (either via ./configure or strongswan.conf).
Also, the plugin does randomly allocate a port if it is configured to 0,
which is useful for client implementations. A consequence of these
changes is that the local UDP port used when creating ike_cfg_t objects has
to be fetched from the socket.
Diffstat (limited to 'src/libhydra/kernel/kernel_interface.c')
-rw-r--r-- | src/libhydra/kernel/kernel_interface.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/libhydra/kernel/kernel_interface.c b/src/libhydra/kernel/kernel_interface.c index b6bc5d92e..650cb1e9e 100644 --- a/src/libhydra/kernel/kernel_interface.c +++ b/src/libhydra/kernel/kernel_interface.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 Tobias Brunner + * Copyright (C) 2008-2012 Tobias Brunner * Hochschule fuer Technik Rapperswil * Copyright (C) 2010 Martin Willi * Copyright (C) 2010 revosec AG @@ -294,6 +294,16 @@ METHOD(kernel_interface_t, bypass_socket, bool, return this->ipsec->bypass_socket(this->ipsec, fd, family); } +METHOD(kernel_interface_t, enable_udp_decap, bool, + private_kernel_interface_t *this, int fd, int family, u_int16_t port) +{ + if (!this->ipsec) + { + return FALSE; + } + return this->ipsec->enable_udp_decap(this->ipsec, fd, family, port); +} + METHOD(kernel_interface_t, get_address_by_ts, status_t, private_kernel_interface_t *this, traffic_selector_t *ts, host_t **ip) { @@ -539,6 +549,7 @@ kernel_interface_t *kernel_interface_create() .add_route = _add_route, .del_route = _del_route, .bypass_socket = _bypass_socket, + .enable_udp_decap = _enable_udp_decap, .get_address_by_ts = _get_address_by_ts, .add_ipsec_interface = _add_ipsec_interface, |