Yuyang Huang e4cbda29ef Fix cache flush always causing response change
When the cache flush bit is set on host address records in a response,
known records are cleared and replaced with the contents of the packet.
However even if the response contains the same records as before, this
caused it to be marked as modified, and response modified callbacks are
sent for every incoming packet.

Instead, ensure that the response is only marked as modified if a
previously unknown address record is added, or if a previously known
address record is removed.

The issue wasn't found by the existing testDecodeWithNoChange test,
because it used a service record for testhost2 instead of testhost1, so
the address records were ignored.

Original change: https://r.android.com/2619297

Bug: 285997766
Bug: 285084489
Test: atest CtsNetTest FrameworksNetTests

Change-Id: I178ed8398afe4354c09bdb3fa5c221377385417e
Merged-In: Ic0f19adf5d9bde7cdab766e49cf677b319a2219b
2023-06-08 09:58:23 +00:00
2023-05-08 21:15:43 +00:00
2021-12-08 06:57:51 +00:00
2023-01-23 15:55:23 +00:00
Description
android_packages_modules_Connectivity
189 MiB
Languages
Java 81.4%
Kotlin 7.7%
AIDL 4.5%
C++ 4.5%
C 1.7%
Other 0.1%