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