Don't consider TRACK_DEFAULT requests in EthernetNetworkFactory.
These should not affect network refcount and thus should not be passed to the network transport. Bug: 116034205 Test: successfully established a VPN when connected to USB ethernet Change-Id: I66517d86f35b8cfc1e211cb189127187d2744b60
This commit is contained in:
@@ -72,6 +72,10 @@ public class EthernetNetworkFactory extends NetworkFactory {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean acceptRequest(NetworkRequest request, int score) {
|
public boolean acceptRequest(NetworkRequest request, int score) {
|
||||||
|
if (request.type == NetworkRequest.Type.TRACK_DEFAULT) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (DBG) {
|
if (DBG) {
|
||||||
Log.d(TAG, "acceptRequest, request: " + request + ", score: " + score);
|
Log.d(TAG, "acceptRequest, request: " + request + ", score: " + score);
|
||||||
}
|
}
|
||||||
@@ -424,6 +428,7 @@ public class EthernetNetworkFactory extends NetworkFactory {
|
|||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getClass().getSimpleName() + "{ "
|
return getClass().getSimpleName() + "{ "
|
||||||
|
+ "refCount: " + refCount + ", "
|
||||||
+ "iface: " + name + ", "
|
+ "iface: " + name + ", "
|
||||||
+ "up: " + mLinkUp + ", "
|
+ "up: " + mLinkUp + ", "
|
||||||
+ "hwAddress: " + mHwAddress + ", "
|
+ "hwAddress: " + mHwAddress + ", "
|
||||||
|
|||||||
Reference in New Issue
Block a user