diff options
author | Chia-chi Yeh <chiachi@android.com> | 2011-06-13 15:26:51 -0700 |
---|---|---|
committer | Chia-chi Yeh <chiachi@android.com> | 2011-06-13 15:26:51 -0700 |
commit | 6224b5ec3857d78e92bbc21075717eaa228ff891 (patch) | |
tree | 3486d738e0c87eee35b824a8e020a565eb54f96f /services/jni | |
parent | 3663227a8be5c6c05bf4adadc378fd69b7ae814c (diff) | |
download | frameworks_base-6224b5ec3857d78e92bbc21075717eaa228ff891.zip frameworks_base-6224b5ec3857d78e92bbc21075717eaa228ff891.tar.gz frameworks_base-6224b5ec3857d78e92bbc21075717eaa228ff891.tar.bz2 |
VPN: set IFF_NO_PI on TUN interface.
Packet info header (struct tun_pi) was required to support IPv6
in kernel prior to 2.6.26. Setting IFF_NO_PI will remove the header
from the packets sent/recieved via TUN file descriptor, so now they
are just raw IP packets.
Change-Id: I0b4ae9db23d3bc10995a00eb053527b499ad6eb6
Diffstat (limited to 'services/jni')
-rw-r--r-- | services/jni/com_android_server_connectivity_Vpn.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/jni/com_android_server_connectivity_Vpn.cpp b/services/jni/com_android_server_connectivity_Vpn.cpp index a968cd2..7953727 100644 --- a/services/jni/com_android_server_connectivity_Vpn.cpp +++ b/services/jni/com_android_server_connectivity_Vpn.cpp @@ -68,7 +68,7 @@ static int create_interface(int mtu, char *name, int *index) memset(&ifr4, 0, sizeof(ifr4)); // Allocate interface. - ifr4.ifr_flags = IFF_TUN; + ifr4.ifr_flags = IFF_TUN | IFF_NO_PI; if (ioctl(tun, TUNSETIFF, &ifr4)) { LOGE("Cannot allocate TUN: %s", strerror(errno)); goto error; |