Commit Graph

4258 Commits

Author SHA1 Message Date
Rubin Xu
86315d57a9 Merge "Always add local subnet routes to the interface's routing table" into oc-mr1-dev
am: 5e0e5974c5

Change-Id: I04ee4b9123a4b43ea435f771e85f713f4ecbc8fe
2017-09-07 18:06:47 +00:00
Rubin Xu
70b9208871 Always add local subnet routes to the interface's routing table
For some networks such as mobile data connections, its LinkProperties
does not contain routes for the local subnet so no such route is added
to the interface's routing table. This can be problematic especially
if the device is in VPN lockdown mode where there exists high-priority
PROHIBIT routing rule which in turn blocks the network's default gateway
route from being added (next hop address hitting the prohibit rule).

We fix this by patching LinkProperties to always include direct connected routes
when they are received by ConnectivityService. This has the added advantage that
when apps get LinkProperties, they see the directly connected routes as well.

Bug: 63662962
Test: runtest frameworks-core -c android.net.LinkPropertiesTest
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest
Test: Start with device with mobile data, set up ics-OpenVPN in always-on
      lockdown mode. Turn off mobile data then turn it back on, observe
      mobile data connectivity is restored and VPN successfully reconnects.

(cherry picked from commit 1bb5c0818f0c4fb426e13b65a3ba3db7f36c3d88)

Change-Id: Ia14f88bcf49d37286519c26dff6b7180303e2cbe
2017-09-07 14:17:57 +01:00
Hugo Benichi
71449be2a7 IP connectivity metrics: fix tests after proto update
Update to ipconnectivity.proto in commit
6d2f506bfd788a3685292d404dc9d82a27357cfe broke the associated unit
tests (Change-Id: I4cf5b95956df721aecd63fddfb026a7266c190b9)

Bug: 34901696
Bug: 65439160
Test: runtest frameworks-net
Merged-In: I57a6bad8a9836b1c45690c4589b416786ce1dfa0

(cherry picked from commit 43b7474c08)

Change-Id: I98b23b2208bbd7d12237fcb000f3cf10c53d9e55
2017-09-07 22:17:18 +09:00
Rubin Xu
af3207c188 Merge "Always add local subnet routes to the interface's routing table" am: 609dd56140 am: 4bb100dcd0
am: e3469a426e

Change-Id: I21f4231c968b37cdcf1565279eedfb990dbc583b
2017-09-07 12:55:58 +00:00
Rubin Xu
4bb100dcd0 Merge "Always add local subnet routes to the interface's routing table"
am: 609dd56140

Change-Id: I0b1728fae18c891d91fafdfbb1905c05e0fea47f
2017-09-07 12:25:05 +00:00
Rubin Xu
609dd56140 Merge "Always add local subnet routes to the interface's routing table" 2017-09-07 12:12:09 +00:00
Rubin Xu
ffd77d8f29 Always add local subnet routes to the interface's routing table
For some networks such as mobile data connections, its LinkProperties
does not contain routes for the local subnet so no such route is added
to the interface's routing table. This can be problematic especially
if the device is in VPN lockdown mode where there exists high-priority
PROHIBIT routing rule which in turn blocks the network's default gateway
route from being added (next hop address hitting the prohibit rule).

We fix this by patching LinkProperties to always include direct connected routes
when they are received by ConnectivityService. This has the added advantage that
when apps get LinkProperties, they see the directly connected routes as well.

Bug: 63662962
Test: runtest frameworks-core -c android.net.LinkPropertiesTest
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest
Test: Start with device with mobile data, set up ics-OpenVPN in always-on
      lockdown mode. Turn off mobile data then turn it back on, observe
      mobile data connectivity is restored and VPN successfully reconnects.
Change-Id: I35b614eebccfd22c4a5270f40256f9be1e25abfb
2017-09-07 10:50:20 +01:00
Hugo Benichi
0ab34a300f Merge "Nat464Xlat: correct racefree teardown" into oc-mr1-dev
am: fa459ad7e2  -s ours

Change-Id: I6d0418f6413c37c1b10c3ef3d3c4cc617ac6e4f3
2017-09-05 22:45:55 +00:00
Hugo Benichi
fa459ad7e2 Merge "Nat464Xlat: correct racefree teardown" into oc-mr1-dev 2017-09-05 22:35:45 +00:00
Hugo Benichi
023528110a Merge "ConnectivityService: improve wakelock logging" am: 1a9b73b701 am: 550c979ad4
am: 2cc55fb4f7  -s ours

Change-Id: Iffd07eab1b85603aa935c4253c526fa4dc2ff745
2017-09-05 14:38:29 +00:00
Hugo Benichi
550c979ad4 Merge "ConnectivityService: improve wakelock logging"
am: 1a9b73b701

Change-Id: I85f8b34008416c920f85e1e5d923dd324dd89e5e
2017-09-05 14:01:20 +00:00
Treehugger Robot
1a9b73b701 Merge "ConnectivityService: improve wakelock logging" 2017-09-05 13:46:53 +00:00
Hugo Benichi
45445770ab 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
Merged-In: I27221a8a60fd9760b567ed322cc79228df877e56
Merged-In: I8f07dfbe5ea8259ff9f5793503f534945e67ad74
Merged-In: I8612db5e5050690db8cf41dd04944b4c22da340c
Merged-In: Icb2dc8229b5ea45e319233b588f2dbe39ea40d4c
Merged-In: Ibafea69224e832a6316c17dbb9b2d62a233088ac

(cherry picked from commit ef502887ec58886e9347afb841aa06cb0d13acea)

Change-Id: I9d075048873b0e1c5ed45b5674ada3fb303c2bfb
2017-09-05 22:12:01 +09:00
Hugo Benichi
646a1a4fb2 Merge "Nat464Xlat: correct racefree teardown" am: 4112ecb7a6 am: 403c46dadf
am: e92029d894

Change-Id: Ibafea69224e832a6316c17dbb9b2d62a233088ac
2017-09-05 13:06:59 +00:00
Hugo Benichi
d1cb22f8c7 ConnectivityService: improve wakelock logging
This patch adds the following wakelock related counters to connectivity
service dumps included in bug reports:
 - total number of wakelok acquisitions and releases
 - total cumulative wakelock duration
 - longest time the lock was held

Bug: 65085354
Test: runtest frameworks-net, also manually dumped connectivity service
      and check new logging

Merged-In: I8f67750c2eea73abf3d44f7f6df484427a8ea3f9
Merged-In: I93c0eb7c8add966378647400e11e33765d952345
Merged-In: Iabe99993001e069b8a8077533bca1fa7fb2f59ba

(cherry picked from commit 88f49acd03)

Change-Id: I4d6bb43110916b440819813b478523546ac5570e
2017-09-05 21:34:03 +09:00
Hugo Benichi
403c46dadf Merge "Nat464Xlat: correct racefree teardown"
am: 4112ecb7a6

Change-Id: I8612db5e5050690db8cf41dd04944b4c22da340c
2017-09-05 12:30:08 +00:00
Hugo Benichi
4112ecb7a6 Merge "Nat464Xlat: correct racefree teardown" 2017-09-05 12:12:02 +00:00
Hugo Benichi
795b9a6371 Merge "ConnectivityService: improve wakelock logging" into oc-mr1-dev
am: 7c687a623b

Change-Id: I93c0eb7c8add966378647400e11e33765d952345
2017-09-05 08:16:21 +00:00
TreeHugger Robot
7c687a623b Merge "ConnectivityService: improve wakelock logging" into oc-mr1-dev 2017-09-05 07:57:00 +00:00
Hugo Benichi
9d35b759e5 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
2017-09-05 15:33:55 +09:00
Hugo Benichi
88f49acd03 ConnectivityService: improve wakelock logging
This patch adds the following wakelock related counters to connectivity
service dumps included in bug reports:
 - total number of wakelok acquisitions and releases
 - total cumulative wakelock duration
 - longest time the lock was held

Bug: 65085354
Test: runtest frameworks-net, also manually dumped connectivity service
      and check new logging

Change-Id: I8f67750c2eea73abf3d44f7f6df484427a8ea3f9
2017-09-05 14:24:13 +09:00
Hugo Benichi
e91afaefd6 Merge "Network Service Discovery test: properly release resources" am: c9d24d203d am: e7849f69a3
am: f467db29f9

Change-Id: Id9be284a16112f999d752751a7972fd735573cda
2017-09-04 12:42:56 +00:00
Hugo Benichi
e7849f69a3 Merge "Network Service Discovery test: properly release resources"
am: c9d24d203d

Change-Id: If34b3770a5c0fef65d124201e0ca1374cc6b1eca
2017-09-04 12:14:11 +00:00
Hugo Benichi
39ab957328 Network Service Discovery test: properly release resources
Bug: 32561414
Bug: 62918393
Bug: 62044295
Test: runtest frameworks-net
Change-Id: If23993b5e391947ecbdc01677f0a643144794b2b
2017-09-02 14:54:29 +09:00
Jeff Sharkey
2b3e602c25 Merge "Gracefully handle integer overflows." into oc-mr1-dev
am: 4d2a8d7203

Change-Id: I6ed70a40ad3e6df55e7669fedfe5b34faf95bd9f
2017-09-02 02:07:25 +00:00
Jeff Sharkey
92313e436a Gracefully handle integer overflows.
Try sticking with integer-based math as much as possible for speed,
but switch to double-based math if we detect that we'd end up
causing an overflow.

New tests to verify.

Test: bit FrameworksNetTests:com.android.server.net.NetworkStatsCollectionTest
Bug: 65257769
Change-Id: I1ae35599be134f81850c0a3d86928b057fba1eff
2017-09-01 17:13:01 -06:00
Hugo Benichi
73c3c66a8e Merge "Revert "Nat464Xlat: interface notification handler on ConnectivityService"" into oc-mr1-dev
am: b3dec17660

Change-Id: If2b714c7e74d95d4fad610772e3d74ab13b923e8
2017-09-01 03:01:59 +00:00
Hugo Benichi
b3dec17660 Merge "Revert "Nat464Xlat: interface notification handler on ConnectivityService"" into oc-mr1-dev 2017-09-01 02:49:17 +00:00
Hugo Benichi
1ca09ace9b Merge "Revert "Nat464Xlat: interface notification handler on ConnectivityService"" am: 1d66352b40 am: 3e569a9562
am: de68a0a1af

Change-Id: Icff7a1fa8888654914fceaf324219ed6af3c95ed
2017-08-31 14:58:48 +00:00
Hugo Benichi
3e569a9562 Merge "Revert "Nat464Xlat: interface notification handler on ConnectivityService""
am: 1d66352b40

Change-Id: I691095ce56e30e2fada93bc5500453f13ac51403
2017-08-31 14:39:18 +00:00
Hugo Benichi
2984496383 Revert "Nat464Xlat: interface notification handler on ConnectivityService"
This reverts commit 39e10e2111.

Bug: 65225023
Change-Id: Id6c21682cafa86d87f66480237dd731b21f917c5
2017-08-31 14:32:54 +00:00
Hugo Benichi
eda8324beb Revert "Nat464Xlat: interface notification handler on ConnectivityService"
This reverts commit b2d70b403f due to b/65225023.

Change-Id: I6ca3780afb8d47b77219d6b5a06760042f684c4b
2017-08-31 14:29:51 +00:00
Jeff Sharkey
3870ccbd02 Merge "Augment network stats based on SubscriptionPlan." into oc-mr1-dev
am: cf84220710

Change-Id: Ia6c6d5893d841f21d181363dc01f77efa6579a8f
2017-08-30 19:14:21 +00:00
Jeff Sharkey
cf84220710 Merge "Augment network stats based on SubscriptionPlan." into oc-mr1-dev 2017-08-30 19:01:18 +00:00
Jeff Sharkey
3c8f96ef4a Augment network stats based on SubscriptionPlan.
When a carrier provides an "anchor" of data usage at a specific
moment in time, augment the network statistics used by warning/limit
thresholds and Settings UI.  For example, if the OS measured 500MB
of usage, but the carrier says only 400MB has been used, we "squish"
down the OS measured usage to match that anchor.

Callers using the hidden API will have their data augmented by
default, and the public API offers a way to opt-into augmentation.

Thorough testing to verify behavior.

Test: bit FrameworksNetTests:android.net.,com.android.server.net.
Test: cts-tradefed run commandAndExit cts-dev -m CtsUsageStatsTestCases -t android.app.usage.cts.NetworkUsageStatsTest
Bug: 64534190
Change-Id: Id3d4d7625bbf04f57643e51dbf376e3fa0ea8eca
2017-08-30 10:01:10 -06:00
Hugo Benichi
1918c0850b Merge changes I34c4a0c3,Iebc7d153,Ibb028886 into oc-mr1-dev
am: 3027f4720a  -s ours

Change-Id: Iff50bd84ac5d36e85bfb344c8bcc1697bca79a27
2017-08-29 23:09:02 +00:00
Hugo Benichi
39e10e2111 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
Merged-In: I889d98e47423ff3d4746d6ed8015b265286e7c52
Merged-In: I2f002cd197e2eeaaadadd747a6b33d264cd34433
Merged-In: Id3ab064cf9f4417c0e8988fff4167b65b3c8c414
Merged-In: Ib224392c9a185f6bd79fd60cd5cb5549f2a7851e
Merged-In: I9116a493ca1cbdf6a25664a1b0017aa6c9b38eb4
Merged-In: I12918d208364eef55067ae9d59fbc38477e1f1c6

(cherry picked from commit 771d5c2f0126ba692897c9716f4098ae6e3a870c)

Change-Id: I34c4a0c32ce7c9b7bd7acf8f87b932e15c573bd8
2017-08-29 15:12:32 +09:00
Hugo Benichi
40bb1b693a Merge "Nat464Xlat: interface notification handler on ConnectivityService" am: 91817b3129 am: 6d5fd71e52
am: f55c1ae9b6

Change-Id: I9116a493ca1cbdf6a25664a1b0017aa6c9b38eb4
2017-08-29 05:42:07 +00:00
Hugo Benichi
6d5fd71e52 Merge "Nat464Xlat: interface notification handler on ConnectivityService"
am: 91817b3129

Change-Id: I2f002cd197e2eeaaadadd747a6b33d264cd34433
2017-08-29 05:20:32 +00:00
Hugo Benichi
9cd15c7f2e 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
Merged-In: I6efc9fed2420ca488731a2b9b9c3c025b16eca10
Merged-In: I188ac4c367db11cb33b67fe92df3a120e3c6fbce
Merged-In: I7e2c5db8d537fb0ab47cde37158b7f04d7786942
Merged-In: Ic2246a97618c596dbdbf48cda39c2f5b66e3bfb6
Merged-In: Ib04b9a3d56e9daf61b299a30e24a3c8839819a00
Merged-In: Icc1558a0f0e7c299270f550897347458e2bd3188

(cherry pick from commit 4f6f139869ddadf6f9ed50967c106a10a2e8ce3f)

Change-Id: Iebc7d153d8cd0b90d074d8d6eed821fbc3f1370d
2017-08-29 10:02:24 +09:00
Hugo Benichi
b2d70b403f 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
2017-08-29 08:55:18 +09:00
Hugo Benichi
b6646ba075 Merge "Nat464Xlat: internal state guards cleanup + state enum" am: aee703e7e4 am: 6d7e12ed6e
am: 68c8b4ad5d

Change-Id: Ib04b9a3d56e9daf61b299a30e24a3c8839819a00
2017-08-28 23:12:13 +00:00
Hugo Benichi
6d7e12ed6e Merge "Nat464Xlat: internal state guards cleanup + state enum"
am: aee703e7e4

Change-Id: I188ac4c367db11cb33b67fe92df3a120e3c6fbce
2017-08-28 22:49:50 +00:00
Hugo Benichi
5a5c1bb116 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

Merged-In: Idb204784614cfe700f73255a7a7b78c5e9ee6eca
Merged-In: Ic3808a1afe48efac745b1b378fb12cc5678918ec
Merged-In: Ia769aef6ef8b258f44f8979003d271c96264f1b5
Merged-In: I1a19e6fbb0cb13262e90b171d861062469078fb6
Merged-In: I06661bd6bd1456ba34a3bbdb52c120ac01da9d61
Merged-In: Ifccff9f3cfccdb2cdddf2f07561f0787a48bc0f8

(cherry picked from commit b577d65825e623a9868664486482ed137b98b504)

Change-Id: Ibb02888633df9643030336c4dbea6c569a47554c
2017-08-28 22:32:11 +09:00
Hugo Benichi
7f0c130788 Merge "Nat464Xlat: clat management cleanup" am: 81b179cfdd am: bd5610af79
am: da71487a59

Change-Id: I06661bd6bd1456ba34a3bbdb52c120ac01da9d61
2017-08-28 12:21:10 +00:00
Hugo Benichi
bd5610af79 Merge "Nat464Xlat: clat management cleanup"
am: 81b179cfdd

Change-Id: Ic3808a1afe48efac745b1b378fb12cc5678918ec
2017-08-28 12:01:25 +00:00
Hugo Benichi
adbbac97c5 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
2017-08-28 15:29:27 +09:00
Hugo Benichi
55d8ae3377 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
2017-08-28 15:29:23 +09:00
Hugo Benichi
2b89a6f05d Merge "Make NetworkManagementServiceTest pass again." am: 29b1826ff2 am: bfe44f641d
am: c933ef6c54

Change-Id: Ic39262b1f650695cc6903c3a9e2ddb592d47b365
2017-08-24 04:09:14 +00:00
Hugo Benichi
bfe44f641d Merge "Make NetworkManagementServiceTest pass again."
am: 29b1826ff2

Change-Id: If7fafa0922fdbc499c0c911a3f88ede9c8a26c1d
2017-08-24 03:46:07 +00:00