diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2013-07-30 09:57:18 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-07-30 09:57:18 -0700 |
commit | 6c3e7b5f0578aee0c49fa2bd4c1ba2572a9d0726 (patch) | |
tree | 6cd67ff4a31c984e5d512b33c49f3f58e8f91b41 /services | |
parent | c2314cf5f4efa2cc767e0069dcc2a67e12d7cd20 (diff) | |
parent | 158840079a501784c76e9816b215b3a1839074ef (diff) | |
download | frameworks_base-6c3e7b5f0578aee0c49fa2bd4c1ba2572a9d0726.zip frameworks_base-6c3e7b5f0578aee0c49fa2bd4c1ba2572a9d0726.tar.gz frameworks_base-6c3e7b5f0578aee0c49fa2bd4c1ba2572a9d0726.tar.bz2 |
am 15884007: Merge "464xlat: use a gatewayed route, not point-to-point"
* commit '158840079a501784c76e9816b215b3a1839074ef':
464xlat: use a gatewayed route, not point-to-point
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/connectivity/Nat464Xlat.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/services/java/com/android/server/connectivity/Nat464Xlat.java b/services/java/com/android/server/connectivity/Nat464Xlat.java index 59403c5..a15d678 100644 --- a/services/java/com/android/server/connectivity/Nat464Xlat.java +++ b/services/java/com/android/server/connectivity/Nat464Xlat.java @@ -147,17 +147,24 @@ public class Nat464Xlat extends BaseNetworkObserver { " added, mIsRunning = " + mIsRunning + " -> true"); mIsRunning = true; - // Get the network configuration of the clat interface, store it - // in our link properties, and stack it on top of the interface - // it's running on. + // Create the LinkProperties for the clat interface by fetching the + // IPv4 address for the interface and adding an IPv4 default route, + // then stack the LinkProperties on top of the link it's running on. + // Although the clat interface is a point-to-point tunnel, we don't + // point the route directly at the interface because some apps don't + // understand routes without gateways (see, e.g., http://b/9597256 + // http://b/9597516). Instead, set the next hop of the route to the + // clat IPv4 address itself (for those apps, it doesn't matter what + // the IP of the gateway is, only that there is one). try { InterfaceConfiguration config = mNMService.getInterfaceConfig(iface); + LinkAddress clatAddress = config.getLinkAddress(); mLP.clear(); mLP.setInterfaceName(iface); - RouteInfo ipv4Default = new RouteInfo(new LinkAddress(Inet4Address.ANY, 0), null, - iface); + RouteInfo ipv4Default = new RouteInfo(new LinkAddress(Inet4Address.ANY, 0), + clatAddress.getAddress(), iface); mLP.addRoute(ipv4Default); - mLP.addLinkAddress(config.getLinkAddress()); + mLP.addLinkAddress(clatAddress); mTracker.addStackedLink(mLP); Slog.i(TAG, "Adding stacked link. tracker LP: " + mTracker.getLinkProperties()); |