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:
@@ -1512,7 +1512,7 @@ public class EthernetTetheringTest {
|
||||
final TestDnsPacket dnsQuery = TestDnsPacket.getTestDnsPacket(buf);
|
||||
assertNotNull(dnsQuery);
|
||||
Log.d(TAG, "Forwarded UDP source port: " + udpHeader.srcPort + ", DNS query id: "
|
||||
+ dnsQuery.getHeader().getId());
|
||||
+ dnsQuery.getHeader().id);
|
||||
|
||||
// [2] Send DNS reply.
|
||||
// DNS server --> upstream --> dnsmasq forwarding --> downstream --> tethered device
|
||||
@@ -1522,7 +1522,7 @@ public class EthernetTetheringTest {
|
||||
final Inet4Address remoteIp = (Inet4Address) TEST_IP4_DNS;
|
||||
final Inet4Address tetheringUpstreamIp = (Inet4Address) TEST_IP4_ADDR.getAddress();
|
||||
sendDownloadPacketDnsV4(remoteIp, tetheringUpstreamIp, DNS_PORT,
|
||||
(short) udpHeader.srcPort, (short) dnsQuery.getHeader().getId(), tester);
|
||||
(short) udpHeader.srcPort, (short) dnsQuery.getHeader().id, tester);
|
||||
}
|
||||
|
||||
private <T> List<T> toList(T... array) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -200,13 +200,13 @@ public class DnsResolverTest {
|
||||
super(data);
|
||||
|
||||
// Check QR field.(query (0), or a response (1)).
|
||||
if ((mHeader.getFlags() & (1 << 15)) == 0) {
|
||||
if ((mHeader.flags & (1 << 15)) == 0) {
|
||||
throw new DnsParseException("Not an answer packet");
|
||||
}
|
||||
}
|
||||
|
||||
int getRcode() {
|
||||
return mHeader.getFlags() & 0x0F;
|
||||
return mHeader.rcode;
|
||||
}
|
||||
|
||||
int getANCount() {
|
||||
|
||||
Reference in New Issue
Block a user