Browse Source

avoid using a large (>= 2^32) constant for wider portability.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac372@3632 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 14 years ago
parent
commit
1d6285dc43
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/lib/dns/rdata/any_255/tsig_250.cc

+ 2 - 1
src/lib/dns/rdata/any_255/tsig_250.cc

@@ -249,7 +249,8 @@ TSIG::TSIG(const Name& algorithm, uint64_t time_signed, uint16_t fudge,
            uint16_t error, uint16_t other_len, const void* other_data) :
     impl_(NULL)
 {
-    if (time_signed > 0xffffffffffff) {
+    // Time Signed is a 48-bit value.
+    if ((time_signed >> 48) != 0) {
         isc_throw(OutOfRange, "TSIG Time Signed is too large: " <<
                   time_signed);
     }