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
Petr Menšík
BIND
Commits
bab57cc8
Commit
bab57cc8
authored
Nov 22, 2000
by
Bob Halley
Browse files
check for singleton rdata type when merging slabs
parent
4f37905c
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/dns/rdataslab.c
View file @
bab57cc8
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdataslab.c,v 1.2
4
2000/11/22 0
0:18
:3
4
halley Exp $ */
/* $Id: rdataslab.c,v 1.2
5
2000/11/22 0
1:55
:3
8
halley Exp $ */
#include <config.h>
...
...
@@ -109,7 +109,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
buflen
+=
(
2
+
rdatas
[
i
-
1
].
length
);
/*
*
Check
that singleton types are actually singletons.
*
Ensure
that singleton types are actually singletons.
*/
if
(
nitems
>
1
&&
dns_rdatatype_issingleton
(
rdataset
->
type
))
{
/*
...
...
@@ -303,6 +303,17 @@ dns_rdataslab_merge(unsigned char *oslab, unsigned char *nslab,
if
(
!
added_something
&&
!
force
)
return
(
DNS_R_UNCHANGED
);
/*
* Ensure that singleton types are actually singletons.
*/
if
(
tcount
>
1
&&
dns_rdatatype_issingleton
(
type
))
{
/*
* We have a singleton type, but there's more than one
* RR in the rdataset.
*/
return
(
DNS_R_SINGLETON
);
}
/*
* Copy the reserved area from the new slab.
*/
...
...
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