summaryrefslogtreecommitdiffstats
path: root/services/jni
diff options
context:
space:
mode:
authorChia-chi Yeh <chiachi@android.com>2011-06-13 16:08:01 -0700
committerChia-chi Yeh <chiachi@android.com>2011-06-13 16:08:01 -0700
commit6ddd57491a06da3ee56056b088424500c144063a (patch)
treef2cb65ce1bf592afaf3c9cd4378f0876f6325129 /services/jni
parent6224b5ec3857d78e92bbc21075717eaa228ff891 (diff)
downloadframeworks_base-6ddd57491a06da3ee56056b088424500c144063a.zip
frameworks_base-6ddd57491a06da3ee56056b088424500c144063a.tar.gz
frameworks_base-6ddd57491a06da3ee56056b088424500c144063a.tar.bz2
VPN: fix a bad optimization of zeroing ifr_flags lately.
Change-Id: Ib7d89422ef0a9159ba912cf32b678821cb72a25a
Diffstat (limited to 'services/jni')
-rw-r--r--services/jni/com_android_server_connectivity_Vpn.cpp2
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 7953727..33f241f 100644
--- a/services/jni/com_android_server_connectivity_Vpn.cpp
+++ b/services/jni/com_android_server_connectivity_Vpn.cpp
@@ -300,10 +300,10 @@ static int check_interface(const char *name)
ifreq ifr4;
strncpy(ifr4.ifr_name, name, IFNAMSIZ);
+ ifr4.ifr_flags = 0;
if (ioctl(inet4, SIOCGIFFLAGS, &ifr4) && errno != ENODEV) {
LOGE("Cannot check %s: %s", name, strerror(errno));
- ifr4.ifr_flags = 0;
}
close(inet4);
return ifr4.ifr_flags;