From: Stephen Morris Date: Sun, 16 Jun 2019 17:14:01 +0000 (+0100) Subject: [#640,!351] Change names of fuzzing environment variables X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e245be5786164590cae3563c7b273f193d95f3e2;p=thirdparty%2Fkea.git [#640,!351] Change names of fuzzing environment variables The variables are now named FUZZ_AFL_ to match those in the ISC fuzz testing framework. --- diff --git a/src/lib/dhcpsrv/fuzz.cc b/src/lib/dhcpsrv/fuzz.cc index b4a2b3e830..f9253124a2 100644 --- a/src/lib/dhcpsrv/fuzz.cc +++ b/src/lib/dhcpsrv/fuzz.cc @@ -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(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"); } diff --git a/src/lib/dhcpsrv/fuzz_messages.cc b/src/lib/dhcpsrv/fuzz_messages.cc index 9e1bd18ae3..65dfe4de2d 100644 --- a/src/lib/dhcpsrv/fuzz_messages.cc +++ b/src/lib/dhcpsrv/fuzz_messages.cc @@ -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 #include diff --git a/src/lib/dhcpsrv/fuzz_messages.h b/src/lib/dhcpsrv/fuzz_messages.h index 4b1e23b95e..6dea5b1871 100644 --- a/src/lib/dhcpsrv/fuzz_messages.h +++ b/src/lib/dhcpsrv/fuzz_messages.h @@ -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 diff --git a/src/lib/dhcpsrv/fuzz_messages.mes b/src/lib/dhcpsrv/fuzz_messages.mes index 0ea8779a71..7e011f74f9 100644 --- a/src/lib/dhcpsrv/fuzz_messages.mes +++ b/src/lib/dhcpsrv/fuzz_messages.mes @@ -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