]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[trac4265] Update copyrights and use HOP_COUNT_LIMIT instead of hardcoded value
authorShawn Routhier <sar@isc.org>
Wed, 6 Apr 2016 18:41:53 +0000 (11:41 -0700)
committerShawn Routhier <sar@isc.org>
Wed, 6 Apr 2016 18:41:53 +0000 (11:41 -0700)
src/lib/dhcp/pkt6.cc
src/lib/dhcp/pkt6.h
src/lib/dhcp/tests/pkt6_unittest.cc
src/lib/eval/eval_context.cc

index cc45d8d3b1c45a34de7ecb8e53801f8658e580c8..ac774c53a39002e0bca57bcbbb92681d1f0e1ed0 100644 (file)
@@ -1,4 +1,4 @@
-// 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");
     }
 
index bade98f36278dd57e3814c2ac2f4f7cd7ae85ccb..44eed2b32056144fd8909b134e336057c46b8848 100644 (file)
@@ -1,4 +1,4 @@
-// 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
index 0859575be5027855d4f1c6c941d86e86c84ebcf0..fa7c750e09db0112b4a3c8467e80ca0eabe50817 100644 (file)
@@ -1,4 +1,4 @@
-// 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
index 188d5f1d9dd86790ea09a590cce3a28202ff6cbc..059cb0fe63ed4b03984cfe12c87df78c25c2ac6f 100644 (file)
@@ -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");
        }