Partially revert "Add blocking and retrying wrappers for INetd uses."
Direct access to Netd from the bluetooth process is disallowed by
SELinux policy. This change reverts to the old behavior where IpManager
interacts with NetdService indirectly via NetworkManagementService.
Bug: 36492299
This partially reverts commit af39244a34.
Change-Id: Icf20b1e24abf7dd3123760f8637928bde7afe06b
This commit is contained in:
@@ -23,7 +23,6 @@ import android.content.Context;
|
||||
import android.net.apf.ApfCapabilities;
|
||||
import android.net.apf.ApfFilter;
|
||||
import android.net.DhcpResults;
|
||||
import android.net.INetd;
|
||||
import android.net.InterfaceConfiguration;
|
||||
import android.net.LinkAddress;
|
||||
import android.net.LinkProperties;
|
||||
@@ -35,12 +34,10 @@ import android.net.dhcp.DhcpClient;
|
||||
import android.net.metrics.IpConnectivityLog;
|
||||
import android.net.metrics.IpManagerEvent;
|
||||
import android.net.util.MultinetworkPolicyTracker;
|
||||
import android.net.util.NetdService;
|
||||
import android.os.INetworkManagementService;
|
||||
import android.os.Message;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
import android.os.ServiceSpecificException;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.util.LocalLog;
|
||||
@@ -1023,16 +1020,14 @@ public class IpManager extends StateMachine {
|
||||
|
||||
private boolean startIPv6() {
|
||||
// Set privacy extensions.
|
||||
final String PREFER_TEMPADDRS = "2";
|
||||
try {
|
||||
NetdService.run((INetd netd) -> {
|
||||
netd.setProcSysNet(
|
||||
INetd.IPV6, INetd.CONF, mInterfaceName, "use_tempaddr",
|
||||
PREFER_TEMPADDRS);
|
||||
});
|
||||
mNwService.setInterfaceIpv6PrivacyExtensions(mInterfaceName, true);
|
||||
mNwService.enableIpv6(mInterfaceName);
|
||||
} catch (IllegalStateException|RemoteException|ServiceSpecificException e) {
|
||||
logError("Unable to change interface settings: %s", e);
|
||||
} catch (RemoteException re) {
|
||||
logError("Unable to change interface settings: %s", re);
|
||||
return false;
|
||||
} catch (IllegalStateException ie) {
|
||||
logError("Unable to change interface settings: %s", ie);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user