Skip to content
Commit 0c374445 authored by Kangping Dong's avatar Kangping Dong
Browse files

[mdns] fix duplicated records for multiple questions

Existing MdnsRecordRepositiry#getReply will result in duplicated RRs in
answer and additional records sections if multiple PTR questions for the
same service are received in a single query message.

This commit fixes this by using a Set<> for maintaining the RR set and
moving the NSEC construction to outer of the addReplyFromService() after
all answer and additional records have been added.

This commit also refactors the unit tests to cover more cases of
multiple queries other than PTR records

Bug: 265095929
Change-Id: I379dd89703915406c5700ed19aad46ef4035b917
parent 907c6e37
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