Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
b099d028
Commit
b099d028
authored
Feb 15, 2011
by
JINMEI Tatuya
Browse files
[trac117] fixed a bug of from text factory: it rejected flags > 0xf (it should be > 0xff)
parent
ccdb524e
Changes
2
Show whitespace changes
Inline
Side-by-side
src/lib/dns/rdata/generic/nsec3_50.cc
View file @
b099d028
...
...
@@ -71,7 +71,7 @@ NSEC3::NSEC3(const string& nsec3_str) :
if
(
iss
.
bad
()
||
iss
.
fail
())
{
isc_throw
(
InvalidRdataText
,
"Invalid NSEC3 text: "
<<
nsec3_str
);
}
if
(
hashalg
>
0xf
)
{
if
(
hashalg
>
0xf
f
)
{
isc_throw
(
InvalidRdataText
,
"NSEC3 hash algorithm out of range: "
<<
hashalg
);
}
...
...
src/lib/dns/tests/rdata_nsec3_unittest.cc
View file @
b099d028
...
...
@@ -46,6 +46,18 @@ public:
string
nsec3_txt
;
};
TEST_F
(
Rdata_NSEC3_Test
,
fromText
)
{
// A normal case: the test constructor should successfully parse the
// text and construct nsec3_txt. It will be tested against the wire format
// representation in the createFromWire test.
// Numeric parameters have possible maximum values. Unusual, but must
// be accepted.
EXPECT_NO_THROW
(
generic
::
NSEC3
(
"255 255 65535 D399EAAB "
"H9RSFB7FPF2L8HG35CMPC765TDK23RP6 "
"NS SOA RRSIG DNSKEY NSEC3PARAM"
));
}
TEST_F
(
Rdata_NSEC3_Test
,
toText
)
{
const
generic
::
NSEC3
rdata_nsec3
(
nsec3_txt
);
EXPECT_EQ
(
nsec3_txt
,
rdata_nsec3
.
toText
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment