Skip to content
Commit 04b61c4a authored by Kangping Dong's avatar Kangping Dong
Browse files

[mdns] fix wrong NSEC answer for unique RRs

Existing MdnsRecordRepositiry#getReply will send a NSEC RR in the reply
when 1) a query for a unique RR is not found or 2) any unique name which is
included in the answer sections. The second one is not aligned with the
spec:

```
On receipt of a question for a particular name, rrtype, and rrclass,
for which a responder does have one or more unique answers, the
responder MAY also include an NSEC record in the Additional Record
Section indicating the nonexistence of other rrtypes for that name
and rrclass.
```

This commit fixes the issue in 2) by checking that all unique records of
the name are included in the answers before adding a NSEC record.

Bug: 265095929
Test: atest FrameworksNetTests
Change-Id: I0531fbccf98e69a50bb8a45e529caaed3ad80b59
parent 0c374445
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