Add local rules for local networks

When a network is a local network, two new IP rules
should be installed :
• A rule that keeps the traffic to directly connected IPs
  working when the catch-all local rule is removed. This
  rule has PRIORITY_LOCAL_NETWORK and matches on the
  explicit bit being off, because the explicit rule will
  be installed separately by ConnectivityService in a
  followup patch at priority EXPLICIT_NETWORK.
20000: from all fwmark 0x0/0x10000 lookup xxxx
• A rule that matches on LOCAL_NET_ID explicitly pointing
  to the same table to keep traffic to netId 99 working.
  This is necessary for the continued working of dnsmasq,
  and might be necessary to keep traffic sent to 99 by
  other means on OEM devices.
16000: from all fwmark 0x10063/0x1ffff iif lo lookup xxxx

Test: new tests in this patch
Change-Id: If8729fc6f3716a580c936584b851bc38000b5de5
4 files changed
tree: 1937cc9c9d97aff5bd025f995d21a492070c0168
  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