Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Knot DNS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
23
Issues
23
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Knot projects
Knot DNS
Commits
b892de18
Commit
b892de18
authored
Jun 12, 2018
by
Daniel Salzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nsec_proofs: get rid off wildcard macro
parent
fedacab1
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
src/knot/nameserver/nsec_proofs.c
src/knot/nameserver/nsec_proofs.c
+8
-14
No files found.
src/knot/nameserver/nsec_proofs.c
View file @
b892de18
...
...
@@ -356,19 +356,6 @@ static int put_wildcard_answer(const zone_node_t *wildcard,
return
ret
;
}
/*!
* \brief Create a wildcard child of a name as a local variable.
*
* \param out Name of the output wariable.
* \param parent Parent of the wildcard.
*/
#define CREATE_WILDCARD(out, parent) \
int size = knot_dname_size(parent); \
if (size < 0 || size > KNOT_DNAME_MAXLEN - 2) return KNOT_EINVAL; \
uint8_t out[2 + size]; \
memcpy(out, "\x01""*", 2); \
memcpy(out + 2, parent, size);
/*!
* \brief Put NSECs for NXDOMAIN error into the response.
*
...
...
@@ -407,7 +394,14 @@ static int put_nsec_nxdomain(const zone_contents_t *zone,
// NOTE: closest may be empty non-terminal and thus not authoritative.
CREATE_WILDCARD
(
wildcard
,
closest
->
owner
)
size_t
size
=
knot_dname_size
(
closest
->
owner
);
if
(
size
>
KNOT_DNAME_MAXLEN
-
2
)
{
return
KNOT_EINVAL
;
}
assert
(
size
>
0
);
uint8_t
wildcard
[
2
+
size
];
memcpy
(
wildcard
,
"
\x01
""*"
,
2
);
memcpy
(
wildcard
+
2
,
closest
->
owner
,
size
);
return
put_covering_nsec
(
zone
,
wildcard
,
qdata
,
resp
);
}
...
...
Write
Preview
Markdown
is supported
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