a56daad1471325913a82d93456c9f3fc081b6f7b |
|
05-Jun-2018 |
junyulai <junyulai@google.com> |
Copy clat modified linkProperties into new one. updateLinkProperties copied the linkProperties in networkAgent, but the clat fix-up function did not copy stacked link into new one. This caused an incorrect clat iface removal, and the IPv4 network to be unreachable. Bug: 80261579 Test: 1. ping after ipv6 only data call with 2g voice call on/off 2. runtest frameworks-net 3. run cts -m CtsNetTestCases Change-Id: Ide47a3b0680dddfcf3e2e759a59b19aee3605050
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
59da962b9fd7f96c5d19249d65152e76566ec1fd |
|
27-Sep-2017 |
Lorenzo Colitti <lorenzo@google.com> |
Delete the legacy framework code for manipulating ND offload. This only worked on broadcom devices, and was superseded in M by a wifi HAL call made by IpManager. Test: bullhead builds, boots Change-Id: I711cae7dafe171c2c8b4e84a229adbcad27f3d14
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
3c18216c26c7bd0580ca4bfb7daa58992037f2c9 |
|
21-Sep-2017 |
Erik Kline <ek@google.com> |
Also support 464xlat on SUSPENDED networks Test: as follows - built - flashed - booted - runtest frameworks-net passes Bug: 65684232 Change-Id: I1b10aab01554b1f926ec7157dba78645fdaff90f
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
ef502887ec58886e9347afb841aa06cb0d13acea |
|
01-Sep-2017 |
Hugo Benichi <hugobenichi@google.com> |
Nat464Xlat: correct racefree teardown This patch relays the NetworkBaseObserver notifications about nat 464xlat stacked interfaces onto the ConnectivityService handler. This allows to process interface up and down notifications in the same thread context and eliminates several races: - NPE risk due to race between fixupLinkProperties called on ConnectivityService thread and interfaceRemoved called on NetworkManagementService thread. - stale LinkProperties pointer reads in both NetworkBaseObserver callbacks not called on ConnectivityService handler. - removes the race between stop() and interfaceRemoved(). - removes superfluous LinkProperties notifications when stop() is called before the stacked interface goes up. The teardown procedure logic common to stop() and interfaceRemoved() is put into enterStoppedState() and enterIdleState(). This allows to distinguish and correctly handle the following teardown scenarios: - an IPv4 appears -> ConnectivityService calls Nat464Xlat#stop() -> Nat464Xlat calls stopClatd -> clatd stops -> if the stacked interface was up, it is removed -> Nat464Xlat#interfaceRemoved() is triggered and a LinkProperties update is sent. - network disconnects -> ConnectivityService calls Nat464Xlat#stop() -> Nat464Xlat calls stopClatd -> clatd stops -> if the stacked interface was up, it is removed -> Nat464Xlat#interfaceRemoved() is triggered and a LinkProperties update is sent. - clatd crashes or exit -> Nat464Xlat#interfaceRemoved() is triggered -> Nat464Xlat unregisters itself as a network observer -> ConnectivityService is updated about the stacked interface missing, and restarts Nat464Xlat if needed. Note that the first two scenarios have two cases: stop() can be called before the notification for the stacked interface going up (STARTED), or after (RUNNING). In the first case, Nat464Xlat must unregister immediately as a network observer to avoid leaks. This patch also: - removes/simplifies comments related to the threading model which are no obsolete. - extract clatd management logic from ConnectivityService into NetworkAgentInfo - add new unit tests where there was none before. Bug: 62918393 Bug: 62997041 Bug: 64571917 Bug: 65225023 Test: runtest frameworks-net Change-Id: I27221a8a60fd9760b567ed322cc79228df877e56
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
50d46a43e3de35111c31a0ce948511277e69fc8f |
|
31-Aug-2017 |
Hugo Benichi <hugobenichi@google.com> |
Revert "Nat464Xlat: interface notification handler on ConnectivityService" This reverts commit 771d5c2f0126ba692897c9716f4098ae6e3a870c due to b/65225023. Change-Id: I6ca3780afb8d47b77219d6b5a06760042f684c4b
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
771d5c2f0126ba692897c9716f4098ae6e3a870c |
|
05-Jul-2017 |
Hugo Benichi <hugobenichi@google.com> |
Nat464Xlat: interface notification handler on ConnectivityService This patch adds a layer of asynchonicity to the NetworkBaseObserver callbacks implemented by Nat464Xlat in order to allow these callbacks to run on the main ConnectivityService handler. This allows to run interfaceLinkStateChanged and interfaceRemoved callbacks in the same thread context as other Nat464Xlat methods and solves the following issues: - NPE risk due to race between fixupLinkProperties called on the ConnectivityService thread and interfaceRemoved called as a callback by NetworkManagementService. - stale LinkProperties reads in both callbacks not called on ConnectivityService handler. - removes the race between stop() and interfaceRemoved(). This patch also: - removes/simplifies comments related to the threading model which are no obsolete. - extract clatd management logic from ConnectivityService into NetworkAgentInfo Bug: 62997041 Bug: 64571917 Test: runtest frameworks-net manually connected to ipv6 network and went to test-ipv6.com Change-Id: I889d98e47423ff3d4746d6ed8015b265286e7c52
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
4f6f139869ddadf6f9ed50967c106a10a2e8ce3f |
|
29-Jun-2017 |
Hugo Benichi <hugobenichi@google.com> |
Nat464Xlat: internal state guards cleanup + state enum This patch does some cleanup of Nat464Xlat internal state guards against the Nat464Xlat state Idle | Started | Running, which reduces code nesting. It also replaces introspection of internal state for distinguishing between different stages in 464xlat lifecycle with an enum explicitly introducing these three Idle | Started | Running states. Bug: 62997041 Bug: 64571917 Test: runtest frameworks-net manually connected to ipv6 network and went to test-ipv6.com Change-Id: I6efc9fed2420ca488731a2b9b9c3c025b16eca10
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
b577d65825e623a9868664486482ed137b98b504 |
|
27-Jun-2017 |
Hugo Benichi <hugobenichi@google.com> |
Nat464Xlat: clat management cleanup This patch does some minor refactoring of clat starting/stopping code: - remove unused LinkProperties arguments in updateClat - remove unused Context argument in Nat464Xlat ctor - introduce ensureClatIsStarted and ensureClatIsStopped methods and simplify updateClat - add clatd to NetworkAgentInfo toString() method - clarify some comments This changes prepare for moving BaseNetworkObserver callbacks to ConnectivityService. Bug: 62997041 Bug: 64571917 Test: runtest frameworks-net manually connected to IPv6 only network and went to test-ipv6.com Change-Id: Idb204784614cfe700f73255a7a7b78c5e9ee6eca
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
853d741ce739e0562e8b5386b8165e3d560fe7d4 |
|
03-Mar-2016 |
Lorenzo Colitti <lorenzo@google.com> |
Support 464xlat on Ethernet. Bug: 26991160 Change-Id: I848c9e86e1ed337e95cfddda46723a9a1dcaed30
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac |
|
28-Feb-2015 |
John Spurlock <jspurlock@google.com> |
Remove unused imports in frameworks/base. Change-Id: I031443de83f93eb57a98863001826671b18f3b17
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
7f6c0d7d2d5ad9e9f316300ce06f27d8492b05cd |
|
11-Nov-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Populate 464xlat LinkProperties only when the interface comes up. Currently Nat464Xlat reads the clat IPv4 address and updates the clat LinkProperties when the interface is created. This causes a race condition: because clatd only sets the IPv4 address after creating the interface, it's possible that Nat464Xlat will read the address before clatd has set it, causing the framework to think that the clat IPv4 address is 0.0.0.0/32. This seems to be happening more frequently now, perhaps because clatd takes a bit longer to configure the IPv4 address now that it needs to check that the address is free before using it. Fix this by making Nat464Xlat listen for the interface coming up instead of listening for the interface being added. Bug: 12111730 Change-Id: Ic1c59b5b6dbb851b7431d1b06885f67803373bb9
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
dc6690867bbe839bbabddd9d7d5e4ec887a2bfee |
|
28-Oct-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Enable 464xlat on wifi. Bug: 12111730 Change-Id: If6d118a3c6e163262b09cc2fb3e3d3f9a81986ec
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
e21a26b3ba78b0238f4ed4a09b43319a2320fbaa |
|
28-Oct-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Add support for running 464xlat on wifi as well. 1. Add a command to NetworkManagementService to enable/disable IPv6 ND offload via netd. 2. Make Nat464Xlat enable offload if clatd successfully comes up on a wifi network (which means it detected a NAT64), and correspondingly re-enable offload when the clatd interface goes down. This change does not enable clatd on wifi yet, that requires an extra 2 lines to enable it. Bug: 12111730 Change-Id: I4318611762a37487c9a84f8c4867ec5aece98be8
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
954394653dad05838235f48244a4320893e0f0cf |
|
09-Oct-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Support more than one clatd at a time. 1. Make Nat464Xlat a per-network object, one for every network requiring clat, instead of a ConnectivityService singleton. 2. Make the NetworkManagementService clatd commands take an interface. 3. When we attempt to start clatd on a network, store its Nat464Xlat object in the NetworkAgentInfo, so we have an authoritative way of knowing whether clat is running on a given network. 4. Rework Nat464Xlat, hopefully simplifying it. Bug: 12111730 Change-Id: I1fa5508ef020cd1c3d1c7a1f7b06370ac5fc2ae2
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
f3cab63ef2248aebf2c931cd1e84d5739791fa50 |
|
20-Oct-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Change removeStackedLink to take an interface name. This simplifies callers. Also remove all "implementations" of addStackedLink and removeStackedLink except the one in LinkProperties, because they are unused. Bug: 12111730 Change-Id: Ie294b855facba4b1436299dcb3211b72d9ba448e
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
1df5fa55c5a5c1ba054b783ea639c99d57c357cf |
|
20-Sep-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Only stop/start clatd if necessary. Previously we would restart clatd on every LinkProperties change, which now happens every time we switch radio technology (e.g., LTE to HSPA). We also would not stop it if the link got an IPv4 address. Bug: 15024258 Bug: 17186694 Bug: 17569702 Change-Id: I65cfcd5e7acec8ea1a12392a59dabd668c58490f
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
43b76dfddbfe2a27a0658dbca8632a9b1dc8d6ff |
|
16-May-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Stop clatd when starting the Nat464Xlat service. If a runtime restart happens while clatd was running, we try to start clatd, which causes a fatal exception because netd returns a 400 error (clatd already started. Bug: 13450716 Bug: 15012035 Change-Id: I102a06d6193fb5f4a1ebe5ad52e5647ff72ca0da
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
3b75982e39ed9370153ae7f238f1d6041b9506ed |
|
13-May-2014 |
Paul Jensen <pauljensen@google.com> |
Get clatd/Nat464Xlat working with new NetworkAgents. Change-Id: I65dfb59ce519a42bdb872940d229039b5403fd92
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|
9158825f9c41869689d6b1786d7c7aa8bdd524ce |
|
22-Nov-2013 |
Amith Yamasani <yamasani@google.com> |
Move some system services to separate directories Refactored the directory structure so that services can be optionally excluded. This is step 1. Will be followed by another change that makes it possible to remove services from the build. Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
/frameworks/base/services/core/java/com/android/server/connectivity/Nat464Xlat.java
|