Remove framework code that calls SIOCKILLADDR
Bug: 26976388 Change-Id: I652361d9e650a77085070d6c26b28b7638ba2dfe
This commit is contained in:
@@ -39,23 +39,6 @@ public class NetworkUtils {
|
||||
|
||||
private static final String TAG = "NetworkUtils";
|
||||
|
||||
/** Setting bit 0 indicates reseting of IPv4 addresses required */
|
||||
public static final int RESET_IPV4_ADDRESSES = 0x01;
|
||||
|
||||
/** Setting bit 1 indicates reseting of IPv4 addresses required */
|
||||
public static final int RESET_IPV6_ADDRESSES = 0x02;
|
||||
|
||||
/** Reset all addresses */
|
||||
public static final int RESET_ALL_ADDRESSES = RESET_IPV4_ADDRESSES | RESET_IPV6_ADDRESSES;
|
||||
|
||||
/**
|
||||
* Reset IPv6 or IPv4 sockets that are connected via the named interface.
|
||||
*
|
||||
* @param interfaceName is the interface to reset
|
||||
* @param mask {@see #RESET_IPV4_ADDRESSES} and {@see #RESET_IPV6_ADDRESSES}
|
||||
*/
|
||||
public native static int resetConnections(String interfaceName, int mask);
|
||||
|
||||
/**
|
||||
* Attaches a socket filter that accepts DHCP packets to the given socket.
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
extern "C" {
|
||||
int ifc_enable(const char *ifname);
|
||||
int ifc_disable(const char *ifname);
|
||||
int ifc_reset_connections(const char *ifname, int reset_mask);
|
||||
}
|
||||
|
||||
#define NETUTILS_PKG_NAME "android/net/NetworkUtils"
|
||||
@@ -50,21 +49,6 @@ namespace android {
|
||||
|
||||
static const uint16_t kDhcpClientPort = 68;
|
||||
|
||||
static jint android_net_utils_resetConnections(JNIEnv* env, jobject clazz,
|
||||
jstring ifname, jint mask)
|
||||
{
|
||||
int result;
|
||||
|
||||
const char *nameStr = env->GetStringUTFChars(ifname, NULL);
|
||||
|
||||
ALOGD("android_net_utils_resetConnections in env=%p clazz=%p iface=%s mask=0x%x\n",
|
||||
env, clazz, nameStr, mask);
|
||||
|
||||
result = ::ifc_reset_connections(nameStr, mask);
|
||||
env->ReleaseStringUTFChars(ifname, nameStr);
|
||||
return (jint)result;
|
||||
}
|
||||
|
||||
static void android_net_utils_attachDhcpFilter(JNIEnv *env, jobject clazz, jobject javaFd)
|
||||
{
|
||||
uint32_t ip_offset = sizeof(ether_header);
|
||||
@@ -181,7 +165,6 @@ static jboolean android_net_utils_queryUserAccess(JNIEnv *env, jobject thiz, jin
|
||||
*/
|
||||
static const JNINativeMethod gNetworkUtilMethods[] = {
|
||||
/* name, signature, funcPtr */
|
||||
{ "resetConnections", "(Ljava/lang/String;I)I", (void *)android_net_utils_resetConnections },
|
||||
{ "bindProcessToNetwork", "(I)Z", (void*) android_net_utils_bindProcessToNetwork },
|
||||
{ "getBoundNetworkForProcess", "()I", (void*) android_net_utils_getBoundNetworkForProcess },
|
||||
{ "bindProcessToNetworkForHostResolution", "(I)Z", (void*) android_net_utils_bindProcessToNetworkForHostResolution },
|
||||
|
||||
Reference in New Issue
Block a user