Skip DNS lookup the cached remote addresses match the network
This patch changes the default DNS strategies to add more DNS bypass
cases. This behavior changes are gated by a mendel flag. Specifically
the existing cases and newly added cases to skip DNS are as follows:
- When network not changed:
- [EXSITING] the locally supported IP families and cached remote
addresses match
- [NEW] the cached remote addresses are dual stack
- When network changed:
- [NEW] the locally supported IP families and cached remote
addresses match
- [NEW] the cached remote addresses are dual stack
This patch also adds an IKE option that allows a caller to force
DNS lookup.
Bug: 254140820
Test: atest FrameworksIkeTests (new tests) && atest CtsIkeTestCases
Test: adb shell device_config put ipsec \
config_use_cached_addr_if_matching_network true and observed
DNS was skipped
Flag: EXEMPT mainline code
Change-Id: I758ca2fe8170c9d4f0223991a712cfb7306a4238
5 files changed