diff options
author | Francis Dupont <fdupont@isc.org> | 2014-10-22 00:34:39 +0200 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2014-10-22 00:34:39 +0200 |
commit | ae3a9cd1a0d2dc07b7092368149381d69bc2c61a (patch) | |
tree | 3d0cceea068c448cf10f36cae2521ca165934751 /src/lib/dns/tsigerror.cc | |
parent | update commit hash (diff) | |
download | kea-ae3a9cd1a0d2dc07b7092368149381d69bc2c61a.tar.xz kea-ae3a9cd1a0d2dc07b7092368149381d69bc2c61a.zip |
[trac3593] added truncated HMAC support to TSIG
Diffstat (limited to 'src/lib/dns/tsigerror.cc')
-rw-r--r-- | src/lib/dns/tsigerror.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/dns/tsigerror.cc b/src/lib/dns/tsigerror.cc index 36ef47da10..c8524f2b0f 100644 --- a/src/lib/dns/tsigerror.cc +++ b/src/lib/dns/tsigerror.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011, 2014 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 @@ -28,7 +28,11 @@ namespace { const char* const tsigerror_text[] = { "BADSIG", "BADKEY", - "BADTIME" + "BADTIME", + "BADMODE", + "BADNAME", + "BADALG", + "BADTRUNC" }; } @@ -42,7 +46,7 @@ std::string TSIGError::toText() const { if (code_ <= MAX_RCODE_FOR_TSIGERROR) { return (Rcode(code_).toText()); - } else if (code_ <= BAD_TIME_CODE) { + } else if (code_ <= BAD_TRUNC_CODE) { return (tsigerror_text[code_ - (MAX_RCODE_FOR_TSIGERROR + 1)]); } else { return (boost::lexical_cast<std::string>(code_)); @@ -54,7 +58,7 @@ TSIGError::toRcode() const { if (code_ <= MAX_RCODE_FOR_TSIGERROR) { return (Rcode(code_)); } - if (code_ > BAD_TIME_CODE) { + if (code_ > BAD_TRUNC_CODE) { return (Rcode::SERVFAIL()); } return (Rcode::NOTAUTH()); |