]> source.dussan.org Git - rspamd.git/commitdiff
Fix resolv.conf parsing with comments.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 8 Apr 2015 13:03:08 +0000 (14:03 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 8 Apr 2015 13:03:08 +0000 (14:03 +0100)
contrib/librdns/util.c

index 7d9dc98d4bedbc07826b1cdf526527118f8e7d0e..974c97554d959fbcab492bbd8eada10a93ce0a56 100644 (file)
@@ -398,7 +398,7 @@ rdns_resolver_conf_process_line (struct rdns_resolver *resolver, char *line)
                        if (has_obrace && *p != ']') {
                                return false;
                        }
-                       else if (*p != '\0' && *p != '\n') {
+                       else if (*p != '\0' && !isspace (*p) && *p != '#') {
                                return false;
                        }
                        *p = '\0';