fpdns-0.10.0_pre20130404.ro-header.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. From ca0391377ad7150e61ff300cb5195c97a154233b Mon Sep 17 00:00:00 2001
  2. From: Jakob Schlyter <jakob@kirei.se>
  3. Date: Wed, 28 Aug 2013 10:24:11 +0200
  4. Subject: [PATCH] do not set header counters unless changed
  5. ---
  6. lib/Net/DNS/Fingerprint.pm | 10 ++++++----
  7. 1 file changed, 6 insertions(+), 4 deletions(-)
  8. diff --git a/lib/Net/DNS/Fingerprint.pm b/lib/Net/DNS/Fingerprint.pm
  9. index d4a2e5a..e096d42 100644
  10. --- a/lib/Net/DNS/Fingerprint.pm
  11. +++ b/lib/Net/DNS/Fingerprint.pm
  12. @@ -2171,10 +2171,12 @@ sub fp2header {
  13. $header->ad(shift @list);
  14. $header->cd(shift @list);
  15. $header->rcode(shift @list);
  16. - $header->qdcount(shift @list);
  17. - $header->ancount(shift @list);
  18. - $header->nscount(shift @list);
  19. - $header->arcount(shift @list);
  20. +
  21. + my ($qdcount, $ancount, $nscount, $arcount) = @list;
  22. + $header->qdcount($qdcount) unless $qdcount == $header->qdcount;
  23. + $header->qdcount($ancount) unless $ancount == $header->ancount;
  24. + $header->qdcount($nscount) unless $nscount == $header->nscount;
  25. + $header->qdcount($arcount) unless $arcount == $header->arcount;
  26. }
  27. sub probe {
  28. --
  29. 1.9.1