Skip to content
Commit 72479c03 authored by Hugo Benichi's avatar Hugo Benichi
Browse files

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 771d5c2f)

Change-Id: I34c4a0c32ce7c9b7bd7acf8f87b932e15c573bd8
parent 883b6492
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment