Revert "[ST02.2] Use the getters of DnsHeader"

Revert submission 1387135-st02

Reason for revert: Usage of TYPE_CNAME in a library shared among
modules does not interact well with current module release process

Reverted Changes:
Ib5616c65c:[ST02.2] Use the getters of DnsHeader
I5e58f99b0:[ST02.1] Add TYPE_CNAME constant to DnsResolver
I0c1547cbc:[ST02] Add methods for synthesizing DNS packets

Change-Id: Ia35cb3e21cd90e036a07018e2d9c1ee662ce86a2
This commit is contained in:
Remi NGUYEN VAN 2022-09-08 11:01:05 +00:00
commit c7043880ef

View file

@ -544,7 +544,7 @@ public final class DnsResolver {
DnsAddressAnswer(@NonNull byte[] data) throws ParseException {
super(data);
if ((mHeader.getFlags() & (1 << 15)) == 0) {
if ((mHeader.flags & (1 << 15)) == 0) {
throw new ParseException("Not an answer packet");
}
if (mHeader.getRecordCount(QDSECTION) == 0) {