]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#898] Changed received RFC 951 error message
authorFrancis Dupont <fdupont@isc.org>
Tue, 10 Dec 2019 09:43:31 +0000 (10:43 +0100)
committerFrancis Dupont <fdupont@isc.org>
Tue, 10 Dec 2019 21:34:09 +0000 (22:34 +0100)
src/lib/dhcp/pkt4.cc

index 73fc04cbc2a7e6dac9e8732cc9b1f2d560a3f5e2..b01ec7b665b7365c4ade98da97140050672ff70a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2017 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-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
@@ -184,18 +184,18 @@ Pkt4::unpack() {
     if (buffer_in.getLength() == buffer_in.getPosition()) {
         // this is *NOT* DHCP packet. It does not have any DHCPv4 options. In
         // particular, it does not have magic cookie, a 4 byte sequence that
-        // differentiates between DHCP and BOOTP packets.
-        isc_throw(InvalidOperation, "Received BOOTP packet. BOOTP is not supported.");
+        // differentiates between DHCP and RFC 951 BOOTP packets.
+        isc_throw(InvalidOperation, "Received BOOTP packet without vendor information extensions.");
     }
 
     if (buffer_in.getLength() - buffer_in.getPosition() < 4) {
-      // there is not enough data to hold magic DHCP cookie
-      isc_throw(Unexpected, "Truncated or no DHCP packet.");
+        // there is not enough data to hold magic DHCP cookie
+        isc_throw(Unexpected, "Truncated or no DHCP packet.");
     }
 
     uint32_t magic = buffer_in.readUint32();
     if (magic != DHCP_OPTIONS_COOKIE) {
-      isc_throw(Unexpected, "Invalid or missing DHCP magic cookie");
+        isc_throw(Unexpected, "Invalid or missing DHCP magic cookie");
     }
 
     size_t opts_len = buffer_in.getLength() - buffer_in.getPosition();