]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix testpkts.c, check if DO bit is set, not only if there is an OPT record.
authorRalph Dolmans <ralph@nlnetlabs.nl>
Tue, 28 Feb 2017 13:11:05 +0000 (13:11 +0000)
committerRalph Dolmans <ralph@nlnetlabs.nl>
Tue, 28 Feb 2017 13:11:05 +0000 (13:11 +0000)
git-svn-id: file:///svn/unbound/trunk@4031 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
testcode/testpkts.c

index 70f1fe8ee4b9252ea35a5ff4989cfc8355a202c2..3c1801c29bbafbf7b35ada2c69093dd3396d29fd 100644 (file)
@@ -1,3 +1,7 @@
+28 February 2017: Ralph
+       - Fix testpkts.c, check if DO bit is set, not only if there is an OPT
+         record.
+
 28 February 2017: Wouter
        - For #1227: if we have sha256, set the cipher list to have no
          known vulns.
index c9ad9d069b568623218c5bd34988d60fc6a99ccc..163c51d506ad1b3ac29d95105b0d4abe83db21c6 100644 (file)
@@ -802,8 +802,8 @@ get_do_flag(uint8_t* pkt, size_t len)
        uint16_t edns_bits;
        uint8_t* walk = pkt;
        size_t walk_len = len;
-       if(pkt_find_edns_opt(&walk, &walk_len)) {
-               return 1;
+       if(!pkt_find_edns_opt(&walk, &walk_len)) {
+               return 0;
        }
        if(walk_len < 6)
                return 0; /* malformed */