[strongSwan-dev] Building strongSwan for Android?
Mikael Magnusson
mikma264 at gmail.com
Sun Dec 30 16:59:18 CET 2012
It works now after a small hack to android_net.c:
diff --git
a/src/frontends/android/jni/libandroidbridge/kernel/android_net.c
b/src/fronte
index bc33959..b9cc4d1 100644
--- a/src/frontends/android/jni/libandroidbridge/kernel/android_net.c
+++ b/src/frontends/android/jni/libandroidbridge/kernel/android_net.c
@@ -108,6 +108,11 @@ METHOD(kernel_net_t, destroy, void,
free(this);
}
+static bool kernel_android_get_interface(kernel_interface_t *this,
host_t *host, char **
+{
+ return true;
+}
+
/*
* Described in header.
*/
@@ -120,7 +125,7 @@ kernel_android_net_t *kernel_android_net_create()
.interface = {
.get_source_addr = _get_source_addr,
.get_nexthop = (void*)return_null,
- .get_interface = (void*)return_null,
+ .get_interface =
(void*)kernel_android_get_interface,
.create_address_enumerator =
(void*)enumerator_create_emp
.add_ip = _add_ip,
.del_ip = (void*)return_failed,
On 12/30/2012 04:46 PM, Mikael Magnusson wrote:
> Hello,
>
> I'm trying to build strongSwan for Android. I have after some changes
> to master (1c65b6) managed to build it but it complains on "looking up
> interface for virtual IP 192.168.1.65 failed", and "setting up TUN
> device failed, no virtual IP found", "failed to setup TUN device".
> (The server and VPN profile settings are working with the strongSwan
> app from Google Play.)
>
> I had to disable CMS (i.e. pkcs7) to be able to build it with the
> openssl referenced on the strongSwan wiki. And I am using ant instead
> of Eclipse.
>
> Can this cause the problem I above?
>
> My changes:
> * Added credentials/containers/container.c to
> src/libstrongswan/Android.mk
> * Added backslashes before single quotes in
> src/frontends/android/res/values-ua/strings.xml
> * Added -DOPENSSL_NO_CMS to src/frontends/android/jni/Android.mk
> * Reverted 36f2e1 "Enable pkcs7 plugin when building scepclient on
> Android"
> * Removed ../../libstrongswan/plugins/openssl/openssl_pkcs7.c
>
> I am building the App using the following commands:
> $ android update project --path `pwd` --target android-14 --name
> strongSwan
> $ ant debug && adb install -r bin/strongSwan-debug.apk
>
> /Mikael
>
More information about the Dev
mailing list