BIND 10 master, updated. 0efb9524bf1782a3e5875982a844a86e6b40460f [master] Merge branch 'trac3069'
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Aug 5 14:15:52 UTC 2013
The branch, master has been updated
via 0efb9524bf1782a3e5875982a844a86e6b40460f (commit)
via 029dc6aa03d7d72d60cb424f1121d916064cd6a4 (commit)
from 067550e38d9bba5831375e9cbbd93674f1353ee2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0efb9524bf1782a3e5875982a844a86e6b40460f
Merge: 067550e 029dc6a
Author: Marcin Siodelski <marcin at isc.org>
Date: Mon Aug 5 15:15:29 2013 +0200
[master] Merge branch 'trac3069'
-----------------------------------------------------------------------
Summary of changes:
.../tools/perfdhcp/tests/test_control_unittest.cc | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
diff --git a/tests/tools/perfdhcp/tests/test_control_unittest.cc b/tests/tools/perfdhcp/tests/test_control_unittest.cc
index 3e0145c..6aff71c 100644
--- a/tests/tools/perfdhcp/tests/test_control_unittest.cc
+++ b/tests/tools/perfdhcp/tests/test_control_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2013 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -241,8 +241,9 @@ public:
size_t matched_num = 0;
for (size_t i = 0; i < buf.size(); i += 2) {
for (int j = 0; j < requested_options.size(); j += 2) {
- uint16_t opt_i = buf[i + 1] << 8 + buf[i] & 0xFF;
- uint16_t opt_j = requested_options[j + 1] << 8 + requested_options[j] & 0xFF;
+ uint16_t opt_i = (buf[i + 1] << 8) + (buf[i] & 0xFF);
+ uint16_t opt_j = (requested_options[j + 1] << 8)
+ + (requested_options[j] & 0xFF);
if (opt_i == opt_j) {
// Requested option has been found.
++matched_num;
@@ -817,10 +818,12 @@ TEST_F(TestControlTest, Options6) {
// Prepare the reference buffer with requested options.
const uint8_t requested_options[] = {
0, D6O_NAME_SERVERS,
- 0, D6O_DOMAIN_SEARCH,
+ 0, D6O_DOMAIN_SEARCH
};
- int requested_options_num =
- sizeof(requested_options) / sizeof(requested_options[0]);
+ // Each option code in ORO is 2 bytes long. We calculate the number of
+ // requested options by dividing the size of the buffer holding options
+ // by the size of each individual option.
+ int requested_options_num = sizeof(requested_options) / sizeof(uint16_t);
OptionBuffer
requested_options_ref(requested_options,
requested_options + sizeof(requested_options));
More information about the bind10-changes
mailing list