Commit 9e2efc3d authored by Francis Dupont's avatar Francis Dupont
Browse files

[#898] Changed received RFC 951 error message

parent cde15d3a
// 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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment