From: Stephen Morris Date: Tue, 6 Aug 2019 10:20:16 +0000 (+0100) Subject: [#640,!351] Fix errors in documentation and comments identified by review X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7767b5b20bd72b321792c60f44dc9807a627bd7;p=thirdparty%2Fkea.git [#640,!351] Fix errors in documentation and comments identified by review --- diff --git a/doc/devel/fuzz.dox b/doc/devel/fuzz.dox index 6d70c87d5d..6f6367f8bc 100644 --- a/doc/devel/fuzz.dox +++ b/doc/devel/fuzz.dox @@ -47,7 +47,7 @@ for this are: AFL may be downloaded from http://lcamtuf.coredump.cx/afl. At the time of writing (August 2019), the latest version is 2.52b. AFL should be built as per the instructions in the README file in the distribution. The LLVM-based - instrumentation programs should also be build, as per the instructions in + instrumentation programs should also be built, as per the instructions in the file llvm_mode/README.llvm (also in the distribution). Note that this requires that LLVM be installed on the machine used for the fuzzing. @@ -91,7 +91,7 @@ for this are: being fuzzed. -# Once the interface has been decided, these need to be set in the - configuration file used for the test. For example, if fuzzing Kea-dhcp4 + configuration file used for the test. For example, to fuzz Kea-dhcp4 using the loopback interface "lo" and IPv4 address 10.53.0.1, the configuration file would contain the following snippet: @code @@ -228,7 +228,7 @@ while (not shutting down) { @endcode Implementation is via an object of class "Fuzz". When created, it identifies -an interface, adress and port on which Kea is listening and creates the +an interface, address and port on which Kea is listening and creates the appropriate address structures for these. The port is passed as an argument to the constructor because at the point at which the object is constructed, that information is readily available. The interface and address are picked up from @@ -250,7 +250,7 @@ In practice, the "while" line is actually: @code{.unparsed} while (__AFL_LOOP(count)) { @endcode -__AFL_LOOP is a token recognised and expanded by the AFL compiler (so no need +__AFL_LOOP is a token recognized and expanded by the AFL compiler (so no need to "#include" a file defining it) that implements the logic for the fuzzing. Each time through the loop (apart from the first), it raises a SIGSTOP signal telling AFL that the packet has been processed and instructing it to provide diff --git a/src/lib/dhcpsrv/fuzz.cc b/src/lib/dhcpsrv/fuzz.cc index e8aa66f7c9..1619c71811 100644 --- a/src/lib/dhcpsrv/fuzz.cc +++ b/src/lib/dhcpsrv/fuzz.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2016-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -48,7 +48,7 @@ Fuzz::Fuzz(int ipversion, uint16_t port) : // Set up address structures. setAddress(ipversion); - // Create the socket throw which packets read from stdin will be send + // Create the socket through which packets read from stdin will be sent // to the port on which Kea is listening. This is closed in the // destructor. sockfd_ = socket((ipversion == 4) ? AF_INET : AF_INET6, SOCK_DGRAM, 0); diff --git a/src/lib/dhcpsrv/fuzz.h b/src/lib/dhcpsrv/fuzz.h index ae7293cf86..0c6fd93eaa 100644 --- a/src/lib/dhcpsrv/fuzz.h +++ b/src/lib/dhcpsrv/fuzz.h @@ -1,4 +1,4 @@ -// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2016-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -28,7 +28,7 @@ namespace isc { /// /// Persistent-mode AFL fuzzing has the AFL fuzzer send packets of data to /// stdin of the program being tested. The program processes the data and -/// signals to AFL that it it complete. +/// signals to AFL that it is complete. /// /// To reduce the code changes required, the scheme adopted for Kea is that /// the AFL data read from stdin is written to an address/port on which Kea @@ -57,7 +57,7 @@ public: /// when trying to send it to the port on which Kea lsutens. static constexpr size_t MAX_SEND_SIZE = 64000; - /// @brief Number of many packets Kea will process until shutting down. + /// @brief Number of packets Kea will process before shutting down. /// /// After the shutdown, AFL will restart it. This safety switch is here for /// eliminating cases where Kea goes into a weird state and stops diff --git a/src/lib/dhcpsrv/fuzz_log.cc b/src/lib/dhcpsrv/fuzz_log.cc index e214aa0a2d..53b860a819 100644 --- a/src/lib/dhcpsrv/fuzz_log.cc +++ b/src/lib/dhcpsrv/fuzz_log.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcpsrv/fuzz_log.h b/src/lib/dhcpsrv/fuzz_log.h index 89a3820d2d..3c0a627439 100644 --- a/src/lib/dhcpsrv/fuzz_log.h +++ b/src/lib/dhcpsrv/fuzz_log.h @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this