From: Richard Gibson Date: Sun, 28 Oct 2018 12:51:08 +0000 (-0400) Subject: Rename skipLabel function to skipDomainName, since that's what it does X-Git-Tag: auth-4.2.0-alpha1~51^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1780c41c89cbf31e4c34808f9c07b402e6da939;p=thirdparty%2Fpdns.git Rename skipLabel function to skipDomainName, since that's what it does --- diff --git a/pdns/dnsparser.cc b/pdns/dnsparser.cc index 29bbb43142..f705228cf9 100644 --- a/pdns/dnsparser.cc +++ b/pdns/dnsparser.cc @@ -582,7 +582,7 @@ public: : d_packet(packet), d_length(length), d_notyouroffset(12), d_offset(d_notyouroffset) {} - void skipLabel() + void skipDomainName() { uint8_t len; while((len=get8BitInt())) { @@ -694,13 +694,13 @@ void editDNSPacketTTL(char* packet, size_t length, std::functionqdcount); for(size_t n = 0; n < qdcount; ++n) { - dpm.skipLabel(); + dpm.skipDomainName(); /* type and class */ dpm.skipBytes(4); } const size_t numrecords = ntohs(dh->ancount) + ntohs(dh->nscount) + ntohs(dh->arcount); for(size_t n = 0; n < numrecords; ++n) { - dpm.skipLabel(); + dpm.skipDomainName(); const uint16_t dnstype = dpm.get16BitInt(); /* class */ const uint16_t dnsclass = dpm.get16BitInt(); @@ -828,13 +828,13 @@ uint32_t getDNSPacketLength(const char* packet, size_t length) const uint16_t qdcount = ntohs(dh->qdcount); for(size_t n = 0; n < qdcount; ++n) { - dpm.skipLabel(); + dpm.skipDomainName(); /* type and class */ dpm.skipBytes(4); } const size_t numrecords = ntohs(dh->ancount) + ntohs(dh->nscount) + ntohs(dh->arcount); for(size_t n = 0; n < numrecords; ++n) { - dpm.skipLabel(); + dpm.skipDomainName(); /* type (2), class (2) and ttl (4) */ dpm.skipBytes(8); dpm.skipRData(); @@ -860,7 +860,7 @@ uint16_t getRecordsOfTypeCount(const char* packet, size_t length, uint8_t sectio const uint16_t qdcount = ntohs(dh->qdcount); for(size_t n = 0; n < qdcount; ++n) { - dpm.skipLabel(); + dpm.skipDomainName(); if (section == 0) { uint16_t dnstype = dpm.get16BitInt(); if (dnstype == type) { @@ -875,7 +875,7 @@ uint16_t getRecordsOfTypeCount(const char* packet, size_t length, uint8_t sectio } const uint16_t ancount = ntohs(dh->ancount); for(size_t n = 0; n < ancount; ++n) { - dpm.skipLabel(); + dpm.skipDomainName(); if (section == 1) { uint16_t dnstype = dpm.get16BitInt(); if (dnstype == type) { @@ -893,7 +893,7 @@ uint16_t getRecordsOfTypeCount(const char* packet, size_t length, uint8_t sectio } const uint16_t nscount = ntohs(dh->nscount); for(size_t n = 0; n < nscount; ++n) { - dpm.skipLabel(); + dpm.skipDomainName(); if (section == 2) { uint16_t dnstype = dpm.get16BitInt(); if (dnstype == type) { @@ -911,7 +911,7 @@ uint16_t getRecordsOfTypeCount(const char* packet, size_t length, uint8_t sectio } const uint16_t arcount = ntohs(dh->arcount); for(size_t n = 0; n < arcount; ++n) { - dpm.skipLabel(); + dpm.skipDomainName(); if (section == 3) { uint16_t dnstype = dpm.get16BitInt(); if (dnstype == type) { @@ -950,13 +950,13 @@ bool getEDNSUDPPayloadSizeAndZ(const char* packet, size_t length, uint16_t* payl const uint16_t qdcount = ntohs(dh->qdcount); for(size_t n = 0; n < qdcount; ++n) { - dpm.skipLabel(); + dpm.skipDomainName(); /* type and class */ dpm.skipBytes(4); } const size_t numrecords = ntohs(dh->ancount) + ntohs(dh->nscount) + ntohs(dh->arcount); for(size_t n = 0; n < numrecords; ++n) { - dpm.skipLabel(); + dpm.skipDomainName(); const uint16_t dnstype = dpm.get16BitInt(); const uint16_t dnsclass = dpm.get16BitInt();