diff options
author | Tobias Brunner <tobias@strongswan.org> | 2011-10-18 11:52:43 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2011-10-18 11:52:43 +0200 |
commit | a8256f0bda86447ff0f436deaff5675938db1cf1 (patch) | |
tree | f6c6c765ddb65874164c8cba478a37c32886d908 /src/pluto | |
parent | bdbbab35b13928c74a55895f54f7b6457e6e762d (diff) | |
download | strongswan-a8256f0bda86447ff0f436deaff5675938db1cf1.tar.bz2 strongswan-a8256f0bda86447ff0f436deaff5675938db1cf1.tar.xz |
pluto: CAP_NET_RAW seems to be required on Android even to open regular sockets.
Diffstat (limited to 'src/pluto')
-rw-r--r-- | src/pluto/plutomain.c | 8 | ||||
-rw-r--r-- | src/pluto/server.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/pluto/plutomain.c b/src/pluto/plutomain.c index 6366b2982..db5f2d941 100644 --- a/src/pluto/plutomain.c +++ b/src/pluto/plutomain.c @@ -294,7 +294,13 @@ int main(int argc, char **argv) bool force_keepalive = FALSE; char *virtual_private = NULL; #ifdef CAPABILITIES - int keep[] = { CAP_NET_ADMIN, CAP_NET_BIND_SERVICE }; + int keep[] = { + CAP_NET_ADMIN, + CAP_NET_BIND_SERVICE, +#ifdef ANDROID + CAP_NET_RAW, +#endif + }; #endif /* CAPABILITIES */ /* initialize library and optionsfrom */ diff --git a/src/pluto/server.c b/src/pluto/server.c index 2d608048b..167b1d4c7 100644 --- a/src/pluto/server.c +++ b/src/pluto/server.c @@ -229,7 +229,7 @@ find_raw_ifaces4(void) struct ifconf ifconf; struct ifreq buf[300]; /* for list of interfaces -- arbitrary limit */ struct raw_iface *rifaces = NULL; - int master_sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); /* Get a UDP socket */ + int master_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); /* Get a UDP socket */ /* get list of interfaces with assigned IPv4 addresses from system */ |