]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Disable dns lookups for fuzzers
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 29 Oct 2021 13:39:45 +0000 (09:39 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 29 Oct 2021 13:40:37 +0000 (09:40 -0400)
src/bin/fuzzer.c

index 5b4d23072125ced296a02a033882487be8d27ae7..ea95e7e6c2621ec5c067758833ca31e66a4dd881 100644 (file)
@@ -154,6 +154,13 @@ int LLVMFuzzerInitialize(int *argc, char ***argv)
                fr_exit_now(EXIT_FAILURE);
        }
 
+       /*
+        *      Disable hostname lookups, so we don't produce spurious DNS
+        *      queries, and there's no chance of spurious failures if
+        *      it takes a long time to get a response.
+        */
+       fr_hostname_lookups = false;
+
        dl_loader = dl_loader_init(NULL, NULL, 0, false);
        if (!dl_loader) {
                fr_perror("fuzzer: Failed initializing library loader");