Mark V6 link-local sockets correctly

The fwmark.netId of the link-local sockets is wrong. FwmarkServer
uses the current default network on connect() if no network is
specified, which can be mobile data or wifi. Netd would incorrectly
destroy link-local sockets when the default network's permission is
changed, since the socket destroy relies on the fwmark.netId.

This change remarks the V6 link-local sockets on connect() based on the
scope id of the destination address.

Bug: 291128241
Test: atest netd_integration_test:NetdBinderTest#V6LinkLocalFwmark
Test: Manually test backup and restore with following steps on the
source devie.
      1. Run backup and restore with mobile data + wifi.
      2. B&R will disconnect device from wifi AP to get full speed.
      3. Plays videos on Youtube when data is copying.
      4. Screen off for a while.
      5. Screen on, the wifi is automatically connected.
      6. Wait 30s and the mobile data permission will be changed.
      7. Wait for the data copy to completed.

Change-Id: Ia461c669bdbfaebd5a1ae2e84e23c0c6cea75297
3 files changed
tree: ed26373da9989ccbbde57fd71c32d67aadc238c3
  1. client/
  2. include/
  3. netutils_wrappers/
  4. server/
  5. tests/
  6. .editorconfig
  7. Android.bp
  8. NOTICE
  9. OWNERS
  10. PREUPLOAD.cfg
  11. TEST_MAPPING