Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Knot Resolver
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
142
Issues
142
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Knot projects
Knot Resolver
Commits
4d91c80a
Commit
4d91c80a
authored
Sep 11, 2018
by
Vladimír Čunát
Committed by
Petr Špaček
Oct 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cache.clear('name'): correct the 'not_apex" warning
It fired also when the name didn't contain the final dot.
parent
23d5b99d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
NEWS
NEWS
+4
-0
daemon/lua/sandbox.lua
daemon/lua/sandbox.lua
+7
-7
No files found.
NEWS
View file @
4d91c80a
...
...
@@ -9,6 +9,10 @@ Improvements
------------
- cache: handle out-of-space SIGBUS slightly better (#197)
Bugfixes
--------
- cache.clear('name'): fix some edge cases in API (#401)
Knot Resolver 3.0.0 (2018-08-20)
================================
...
...
daemon/lua/sandbox.lua
View file @
4d91c80a
...
...
@@ -180,16 +180,16 @@ cache.clear = function (name, exact_name, rr_type, chunk_size, callback, prev_st
-- we assume they are advanced enough not to need the check.
-- The point is to avoid repeating the check in each callback iteration.
if
callback
==
nil
then
local
names
=
ffi
.
new
(
'knot_dname_t *[1]'
)
-- C: dname **names
local
ret
=
ffi
.
C
.
kr_cache_closest_apex
(
cach
,
dname
,
false
,
names
)
local
apex_array
=
ffi
.
new
(
'knot_dname_t *[1]'
)
-- C: dname **apex_array
local
ret
=
ffi
.
C
.
kr_cache_closest_apex
(
cach
,
dname
,
false
,
apex_array
)
if
ret
<
0
then
error
(
ffi
.
string
(
ffi
.
C
.
knot_strerror
(
ret
)))
end
ffi
.
gc
(
names
[
0
],
ffi
.
C
.
free
)
local
apex
=
kres
.
dname2str
(
names
[
0
])
if
apex
~=
name
then
ffi
.
gc
(
apex_array
[
0
],
ffi
.
C
.
free
)
if
not
ffi
.
C
.
knot_dname_is_equal
(
apex_array
[
0
],
dname
)
then
local
apex_str
=
kres
.
dname2str
(
apex_array
[
0
])
rettable
.
not_apex
=
'to clear proofs of non-existence call '
..
'cache.clear(\'' .. tostring(apex) ..'
\
')'
rettable
.
subtree
=
apex
..
'cache.clear(\'' .. tostring(apex
_str
) ..'
\
')'
rettable
.
subtree
=
apex
_str
end
end
...
...
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