summaryrefslogtreecommitdiffstats
path: root/src/send.c
diff options
context:
space:
mode:
authorRick Lei <ricklei@gmail.com>2015-01-14 15:11:43 +0100
committerRick Lei <ricklei@gmail.com>2015-01-14 15:11:43 +0100
commitc4378784ae2caec57634f9f04bcb3dcddc673f36 (patch)
tree70bbdb1c348803006a7cbf2092da65312720a386 /src/send.c
parent133cee578e04e561bb17e37393bbf7e427522560 (diff)
downloadfastd-c4378784ae2caec57634f9f04bcb3dcddc673f36.tar
fastd-c4378784ae2caec57634f9f04bcb3dcddc673f36.zip
Add Android 4.1+ support. See doc/README-Android.md for build HOWTO.
* Update CMake files to work with android-cmake * Use unix domain socket for communicating with Android GUI * May also run standalone but requires rooted Android device
Diffstat (limited to 'src/send.c')
-rw-r--r--src/send.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/send.c b/src/send.c
index 8b9aae7..6e425c6 100644
--- a/src/send.c
+++ b/src/send.c
@@ -2,6 +2,10 @@
Copyright (c) 2012-2014, Matthias Schiffer <mschiffer@universe-factory.net>
All rights reserved.
+ Android port contributor:
+ Copyright (c) 2014-2015, Haofeng "Rick" Lei <ricklei@gmail.com>
+ All rights reserved.
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -38,6 +42,11 @@
/** Adds packet info to ancillary control messages */
static inline void add_pktinfo(struct msghdr *msg, const fastd_peer_address_t *local_addr) {
+#ifdef __ANDROID__
+ /* PKTINFO will mess with Android VpnService.protect(socket) */
+ if (conf.android_integration)
+ return;
+#endif
if (!local_addr)
return;