Skip to content
Commit 98a44bcb authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN Committed by Yuyang Huang
Browse files

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.

Bug: 285997766
Bug: 285084489
Test: atest CtsNetTest FrameworksNetTests

Change-Id: Ic0f19adf5d9bde7cdab766e49cf677b319a2219b
parent 00dc4ade
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment