From 869c70903a63cc17a410b83a5cd86f8f7da387cc Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Wed, 11 Aug 2010 08:52:03 +0000 Subject: [PATCH] also check class in dnspacketlessthan git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1688 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/dns.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pdns/dns.cc b/pdns/dns.cc index d90bed20a..c0a47739e 100644 --- a/pdns/dns.cc +++ b/pdns/dns.cc @@ -84,7 +84,11 @@ bool dnspacketLessThan(const std::string& a, const std::string& b) uint16_t aQtype = aSafe[aPos]*256 + aSafe[aPos + 1]; uint16_t bQtype = bSafe[bPos]*256 + bSafe[bPos + 1]; - return aQtype < bQtype; + + uint16_t aQclass = aSafe[aPos+2]*256 + aSafe[aPos + 3]; + uint16_t bQclass = bSafe[bPos+2]*256 + bSafe[bPos + 3]; + + return boost::tie(aQtype, aQclass) < boost::tie(bQtype, bQclass); } -- 2.50.1