BIND 10 trac2304, updated. 9062cbabaeebead0b95bde1559d107fc35eeda1d [2304] Minor additions in comments.
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Oct 12 07:29:07 UTC 2012
The branch, trac2304 has been updated
via 9062cbabaeebead0b95bde1559d107fc35eeda1d (commit)
from f3414d4ba60432e36785c23ca55c633ad35298ab (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 9062cbabaeebead0b95bde1559d107fc35eeda1d
Author: Marcin Siodelski <marcin at isc.org>
Date: Fri Oct 12 09:28:40 2012 +0200
[2304] Minor additions in comments.
-----------------------------------------------------------------------
Summary of changes:
src/lib/dhcp/option6_int.h | 6 +++++-
src/lib/dhcp/option6_int_array.h | 2 ++
2 files changed, 7 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dhcp/option6_int.h b/src/lib/dhcp/option6_int.h
index f6bf1ab..cdc625e 100644
--- a/src/lib/dhcp/option6_int.h
+++ b/src/lib/dhcp/option6_int.h
@@ -61,7 +61,7 @@ public:
/// @param begin iterator to first byte of option data.
/// @param end iterator to end of option data (first byte after option end).
///
- /// @todo mention here what it throws.
+ /// @throw isc::OutOfRange if provided buffer is shorter than data size.
Option6Int(uint16_t type, OptionBufferConstIter begin,
OptionBufferConstIter end)
: Option(Option::V6, type) {
@@ -108,10 +108,14 @@ public:
///
/// @param begin iterator to first byte of option data
/// @param end iterator to end of option data (first byte after option end)
+ ///
+ /// @throw isc::OutOfRange if provided buffer is shorter than data size.
virtual void unpack(OptionBufferConstIter begin, OptionBufferConstIter end) {
if (distance(begin, end) < sizeof(T)) {
isc_throw(OutOfRange, "Option " << getType() << " truncated");
}
+ // @todo consider what to do if buffer is longer than data type.
+
// Depending on the data type length we use different utility functions
// readUint16 or readUint32 which read the data laid in the network byte
// order from the provided buffer. The same functions can be safely used
diff --git a/src/lib/dhcp/option6_int_array.h b/src/lib/dhcp/option6_int_array.h
index c9531c6..a88e539 100644
--- a/src/lib/dhcp/option6_int_array.h
+++ b/src/lib/dhcp/option6_int_array.h
@@ -145,6 +145,8 @@ public:
if (distance(begin, end) % sizeof(T) != 0) {
isc_throw(OutOfRange, "option " << getType() << " truncated");
}
+ // @todo consider what to do if buffer is longer than data type.
+
values_.clear();
while (begin != end) {
// Depending on the data type length we use different utility functions
More information about the bind10-changes
mailing list