Stop clat if it's no longer in use.
Normally, clatd is stopped when a connection disconnects. However, if the connection's LinkProperties change, or if the disconnect somehow gets lost (e.g., because of bug 8486114), then we need to stop it (and possibly restart it). Bug: 8276725 Change-Id: Ib8ad0d653ed8d0cd70b7414bcaa8fdaef8ba5fcc
This commit is contained in:
@@ -87,6 +87,10 @@ public class Nat464Xlat extends BaseNetworkObserver {
|
||||
return netType == TYPE_MOBILE && !lp.hasIPv4Address();
|
||||
}
|
||||
|
||||
public static boolean isRunningClat(LinkProperties lp) {
|
||||
return lp != null && lp.getAllInterfaceNames().contains(CLAT_INTERFACE_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the clat daemon.
|
||||
* @param lp The link properties of the interface to start clatd on.
|
||||
|
||||
Reference in New Issue
Block a user