Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Knot projects
Knot DNS
Commits
7dca4376
Commit
7dca4376
authored
Mar 12, 2013
by
Jan Kadlec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust zone before removing empty nodes.
parent
8c680b06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
21 deletions
+12
-21
src/libknot/updates/xfr-in.c
src/libknot/updates/xfr-in.c
+12
-21
No files found.
src/libknot/updates/xfr-in.c
View file @
7dca4376
...
...
@@ -2948,10 +2948,6 @@ dbg_xfrin_exec_detail(
dbg_xfrin
(
"Failed to remove node from zone!
\n
"
);
return
KNOT_ENONODE
;
}
// LS: REVIEW
if
(
zone_node
->
owner
->
node
==
zone_node
)
{
zone_node
->
owner
->
node
=
NULL
;
}
free
(
zone_node
);
changes
->
old_nodes
[
i
]
=
NULL
;
}
...
...
@@ -2973,11 +2969,6 @@ dbg_xfrin_exec_detail(
dbg_xfrin
(
"Failed to remove NSEC3 node from zone!
\n
"
);
return
KNOT_ENONODE
;
}
// LS: REVIEW
if
(
zone_node
->
owner
->
node
==
zone_node
)
{
zone_node
->
owner
->
node
=
NULL
;
}
free
(
zone_node
);
changes
->
old_nsec3
[
i
]
=
NULL
;
}
...
...
@@ -3125,6 +3116,18 @@ int xfrin_finalize_updated_zone(knot_zone_contents_t *contents_copy,
* - do adjusting of nodes and RDATA
* - ???
*/
dbg_xfrin
(
"Adjusting zone contents.
\n
"
);
dbg_xfrin_verb
(
"Old contents apex: %p, new apex: %p
\n
"
,
old_contents
->
apex
,
contents_copy
->
apex
);
ret
=
knot_zone_contents_adjust
(
contents_copy
,
NULL
,
NULL
);
if
(
ret
!=
KNOT_EOK
)
{
dbg_xfrin
(
"Failed to finalize zone contents: %s
\n
"
,
knot_strerror
(
ret
));
// xfrin_rollback_update(old_contents, &contents_copy, &changes);
return
ret
;
}
assert
(
knot_zone_contents_apex
(
contents_copy
)
!=
NULL
);
/*
* Select and remove empty nodes from zone trees. Do not free them right
...
...
@@ -3138,18 +3141,6 @@ int xfrin_finalize_updated_zone(knot_zone_contents_t *contents_copy,
return
ret
;
}
dbg_xfrin
(
"Adjusting zone contents.
\n
"
);
dbg_xfrin_verb
(
"Old contents apex: %p, new apex: %p
\n
"
,
old_contents
->
apex
,
contents_copy
->
apex
);
ret
=
knot_zone_contents_adjust
(
contents_copy
,
NULL
,
NULL
);
if
(
ret
!=
KNOT_EOK
)
{
dbg_xfrin
(
"Failed to finalize zone contents: %s
\n
"
,
knot_strerror
(
ret
));
// xfrin_rollback_update(old_contents, &contents_copy, &changes);
return
ret
;
}
assert
(
knot_zone_contents_apex
(
contents_copy
)
!=
NULL
);
dbg_xfrin
(
"Checking zone for CNAME loops.
\n
"
);
ret
=
knot_zone_contents_check_loops
(
contents_copy
);
if
(
ret
!=
KNOT_EOK
)
{
...
...
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