]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/dnssec: bad condition
authorMarek Vavruša <marek.vavrusa@nic.cz>
Sat, 28 Nov 2015 22:37:54 +0000 (23:37 +0100)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Sat, 28 Nov 2015 22:37:54 +0000 (23:37 +0100)
lib/dnssec/nsec.c

index 683c8f37e341a5f2d6efc505572d6298fa0b0db5..7106a968e54733242fb27427de1ff301120d2825 100644 (file)
@@ -117,7 +117,7 @@ static int name_error_response_check_rr(int *flags, const knot_rrset_t *nsec,
        /* Try to find parent wildcard that is proved by this NSEC. */ 
        uint8_t namebuf[KNOT_DNAME_MAXLEN];
        int ret = knot_dname_to_wire(namebuf, name, sizeof(namebuf));
-       if (ret != 0)
+       if (ret < 0)
                return ret;
        knot_dname_t *ptr = namebuf;
        while (ptr[0]) {