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 DNS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
22
Issues
22
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
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 DNS
Commits
9383588b
Commit
9383588b
authored
Jun 28, 2013
by
Marek Vavrusa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverted inconsistency checking since this wouldn't work with ixfr-from-differences.
parent
c374b1da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
39 deletions
+1
-39
NEWS
NEWS
+0
-1
src/knot/server/zones.c
src/knot/server/zones.c
+1
-38
No files found.
NEWS
View file @
9383588b
...
...
@@ -14,7 +14,6 @@ Bugfixes:
* Processing of knotc TSIG keyfile
* Atomic PID file writing, removed deprecated 'knotc start'
* Performance regression when RRSIGs came before covered RRs in AXFR
* Checks for inconsistent zone file / journal
v1.3.0-rc2 - Jun 14, 2013
-------------------------
...
...
src/knot/server/zones.c
View file @
9383588b
...
...
@@ -1010,32 +1010,6 @@ static int zones_journal_apply(knot_zone_t *zone)
return
ret
;
}
/*----------------------------------------------------------------------------*/
/* Backup journal and remove it.
* This is required when a zone file is manually updated (=> newer) while there
* are unprocessed changes in the journal file to prevent inconsistencies.
*/
static
int
zones_discard_journal
(
conf_zone_t
*
z
)
{
log_server_warning
(
"Journal file out of sync with '%s'.
\n
"
,
z
->
name
);
log_server_warning
(
"Creating backup '%s.bak' and clearing it.
\n
"
,
z
->
ixfr_db
);
char
*
file_bak
=
strcdup
(
z
->
ixfr_db
,
".bak"
);
if
(
file_bak
==
NULL
)
return
KNOT_ENOMEM
;
/* This would be very strange since 'storage' is checked for 'rw' */
if
(
unlink
(
file_bak
)
!=
0
||
rename
(
z
->
ixfr_db
,
file_bak
)
!=
0
)
{
log_server_error
(
"Couldn't remove journal file '%s'.
\n
"
,
z
->
ixfr_db
);
free
(
file_bak
);
return
KNOT_ERROR
;
}
free
(
file_bak
);
return
KNOT_EOK
;
}
/*!
* \brief Insert new zone to the database.
*
...
...
@@ -1075,7 +1049,7 @@ static int zones_insert_zone(conf_zone_t *z, knot_zone_t **dst,
/* Attempt to bootstrap if db or source does not exist. */
int
ret
=
KNOT_ERROR
;
int
zone_changed
=
0
;
struct
stat
st_
db
,
st_
zone
;
struct
stat
st_zone
;
int
stat_ret
=
stat
(
z
->
file
,
&
st_zone
);
if
(
zone
!=
NULL
)
{
if
(
stat_ret
==
0
&&
knot_zone_version
(
zone
)
<
st_zone
.
st_mtime
)
{
...
...
@@ -1085,17 +1059,6 @@ static int zones_insert_zone(conf_zone_t *z, knot_zone_t **dst,
zone_changed
=
1
;
}
/* Check for inconsistent zone <-> journal file. */
if
(
stat_ret
==
0
&&
stat
(
z
->
ixfr_db
,
&
st_db
)
==
0
)
{
if
(
st_zone
.
st_mtime
>
st_db
.
st_mtime
)
{
ret
=
zones_discard_journal
(
z
);
if
(
ret
!=
KNOT_EOK
)
{
knot_dname_free
(
&
dname
);
return
ret
;
}
}
}
/* Reload zone file. */
if
(
zone_changed
)
{
/* Zone file not exists and has master set. */
...
...
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