]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#640,!351] Change names of fuzzing environment variables
authorStephen Morris <stephen@isc.org>
Sun, 16 Jun 2019 17:14:01 +0000 (18:14 +0100)
committerStephen Morris <stephen@isc.org>
Tue, 1 Oct 2019 16:00:21 +0000 (17:00 +0100)
The variables are now named FUZZ_AFL_ to match those in the ISC fuzz
testing framework.

src/lib/dhcpsrv/fuzz.cc
src/lib/dhcpsrv/fuzz_messages.cc
src/lib/dhcpsrv/fuzz_messages.h
src/lib/dhcpsrv/fuzz_messages.mes

index b4a2b3e83067d3155293146cf4d2c42a87e5280d..f9253124a2004aa73b9da307a3906df8a4264346 100644 (file)
@@ -88,7 +88,7 @@ Fuzz::Fuzz(int ipversion, volatile bool* shutdown) :
         setAddress(ipversion);
 
         // Check if the hard-coded maximum loop count is being overridden
-        const char *loop_max_ptr = getenv("KEA_AFL_LOOP_MAX");
+        const char *loop_max_ptr = getenv("FUZZ_AFL_LOOP_MAX");
         if (loop_max_ptr != 0) {
             try {
                 loop_max_ = boost::lexical_cast<long>(loop_max_ptr);
@@ -99,7 +99,7 @@ Fuzz::Fuzz(int ipversion, volatile bool* shutdown) :
             }
 
             if (loop_max_ <= 0) {
-                reason << "KEA_AFL_LOOP_MAX is " << loop_max_ << ". "
+                reason << "FUZZ_AFL_LOOP_MAX is " << loop_max_ << ". "
                        << "It must be an integer greater than zero.";
                 isc_throw(FuzzInitFail, reason.str());
             }
@@ -139,19 +139,19 @@ Fuzz::setAddress(int ipversion) {
     stringstream reason;    // Used in error messages
 
     // Get the environment for the fuzzing: interface, address and port.
-    interface_ = getenv("KEA_AFL_INTERFACE");
+    interface_ = getenv("FUZZ_AFL_INTERFACE");
     if (! interface_) {
         isc_throw(FuzzInitFail, "no fuzzing interface has been set");
     }
 
     // Now the address.
-    address_ = getenv("KEA_AFL_ADDRESS");
+    address_ = getenv("FUZZ_AFL_ADDRESS");
     if (address_ == 0) {
         isc_throw(FuzzInitFail, "no fuzzing address has been set");
     }
 
     // ... and the port.
-    const char *port_ptr = getenv("KEA_AFL_PORT");
+    const char *port_ptr = getenv("FUZZ_AFL_PORT");
     if (port_ptr == 0) {
         isc_throw(FuzzInitFail, "no fuzzing port has been set");
     }
index 9e1bd18ae3386390569229641188d9785ffcc372..65dfe4de2d5da3053830b3625247edf644f7726b 100644 (file)
@@ -1,4 +1,4 @@
-// File created from ../../../src/lib/dhcpsrv/fuzz_messages.mes on Thu Jun 13 2019 12:34
+// File created from ../../../src/lib/dhcpsrv/fuzz_messages.mes on Sun Jun 16 2019 18:13
 
 #include <cstddef>
 #include <log/message_types.h>
index 4b1e23b95e534eddebb2074a6dd7711fca0c006e..6dea5b1871a7de72a522bef7c06de5b6a768e5be 100644 (file)
@@ -1,4 +1,4 @@
-// File created from ../../../src/lib/dhcpsrv/fuzz_messages.mes on Thu Jun 13 2019 12:34
+// File created from ../../../src/lib/dhcpsrv/fuzz_messages.mes on Sun Jun 16 2019 18:13
 
 #ifndef FUZZ_MESSAGES_H
 #define FUZZ_MESSAGES_H
index 0ea8779a716ec71b8682d4c1153d28395f6f4410..7e011f74f9d7e35aae5a89f11c014a6ee132354f 100644 (file)
@@ -33,7 +33,7 @@ state after running for a long time.
 % FUZZ_LOOP_MAX fuzzing loop will run %1 time(s) before exiting
 A debug message noting how many loops (i.e. packets from the fuzzer) the code
 will process before Kea exits and the fuzzer restarts it.  The hard-coded
-value can be overridden by setting the environment variable KEA_AFL_LOOP_MAX.
+value can be overridden by setting the environment variable FUZZ_AFL_LOOP_MAX.
 
 % FUZZ_PACKET_PROCESSED_CALLED packetProcessed has been called
 A debug message indicating that the processing of a packet by Kea has