]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: fix DNS_TYPE_ANY vs DNS_CLASS_ANY confusion
authorDaniel Mack <daniel@zonque.org>
Wed, 15 Jul 2015 18:37:42 +0000 (14:37 -0400)
committerDaniel Mack <daniel@zonque.org>
Fri, 24 Jul 2015 17:54:00 +0000 (19:54 +0200)
Assigning a TPYE enum value to a class variable is certainly wrong.
However, they both have the same value, so the result was correct
nevertheless.

src/resolve/resolved-dns-rr.c

index 2bc9f2b52056357108e0cfa4cda897316fed8d40..ad7ca26cfea72eeba961e46b10ce855810c36c59 100644 (file)
@@ -840,7 +840,7 @@ int dns_class_from_string(const char *s, uint16_t *class) {
         if (strcaseeq(s, "IN"))
                 *class = DNS_CLASS_IN;
         else if (strcaseeq(s, "ANY"))
-                *class = DNS_TYPE_ANY;
+                *class = DNS_CLASS_ANY;
         else
                 return -EINVAL;