Commit 0e4e33ca authored by Shawn Routhier's avatar Shawn Routhier

[trac4265] Update copyrights and use HOP_COUNT_LIMIT instead of hardcoded value

parent 42b50c9a
// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-2016 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
......@@ -447,7 +447,7 @@ Pkt6::unpackRelayMsg() {
void
Pkt6::addRelayInfo(const RelayInfo& relay) {
if (relay_info_.size() > 32) {
if (relay_info_.size() > HOP_COUNT_LIMIT) {
isc_throw(BadValue, "Massage cannot be encapsulated more than 32 times");
}
......
// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-2016 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
......
// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-2016 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
......
......@@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <dhcp/dhcp6.h>
#include <dhcp/option.h>
#include <dhcp/option_definition.h>
#include <dhcp/libdhcp++.h>
......@@ -103,7 +104,7 @@ EvalContext::convertNestLevelNumber(const std::string& nest_level,
error(loc, "Nest level has invalid value in " + nest_level);
}
if (option_universe_ == Option::V6) {
if (n < 0 || n > 31) {
if (n < 0 || n >= HOP_COUNT_LIMIT) {
error(loc, "Nest level has invalid value in "
+ nest_level + ". Allowed range: 0..31");
}
......
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