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
24
Issues
24
List
Boards
Labels
Service Desk
Milestones
Merge Requests
18
Merge Requests
18
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
16e5ccdc
Commit
16e5ccdc
authored
May 18, 2017
by
Daniel Salzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: add partial migration support for renamed modules
parent
6ff0d1ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
2 deletions
+48
-2
src/knot/conf/migration.c
src/knot/conf/migration.c
+35
-1
src/knot/conf/migration.h
src/knot/conf/migration.h
+9
-1
src/knot/conf/scheme.c
src/knot/conf/scheme.c
+4
-0
No files found.
src/knot/conf/migration.c
View file @
16e5ccdc
/* Copyright (C) 201
6
CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
/* Copyright (C) 201
7
CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -131,3 +131,37 @@ int conf_migrate(
return
conf_refresh_txn
(
conf
);
}
const
yp_item_t
scheme_mod_online_sign
[]
=
{
{
C_ID
,
YP_TSTR
},
{
C_POLICY
,
YP_TSTR
},
{
C_COMMENT
,
YP_TSTR
},
{
NULL
}
};
int
check_mod_online_sign
(
knotd_conf_check_args_t
*
args
)
{
CONF_LOG
(
LOG_WARNING
,
"module 'mod-online-sign' must be renamed 'mod-onlinesign'"
);
return
KNOT_EOK
;
}
const
yp_item_t
scheme_mod_synth_record
[]
=
{
{
C_ID
,
YP_TSTR
},
{
"
\x07
""network"
,
YP_TSTR
},
{
"
\x06
""origin"
,
YP_TSTR
},
{
"
\x06
""prefix"
,
YP_TSTR
},
{
"
\x03
""ttl"
,
YP_TSTR
},
{
"
\x04
""type"
,
YP_TSTR
},
{
C_COMMENT
,
YP_TSTR
},
{
NULL
}
};
int
check_mod_synth_record
(
knotd_conf_check_args_t
*
args
)
{
CONF_LOG
(
LOG_WARNING
,
"module 'mod-synth_record' must be renamed 'mod-synthrecord'"
);
return
KNOT_EOK
;
}
src/knot/conf/migration.h
View file @
16e5ccdc
/* Copyright (C) 201
6
CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
/* Copyright (C) 201
7
CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -28,3 +28,11 @@
int
conf_migrate
(
conf_t
*
conf
);
#define C_MOD_ONLINE_SIGN "\x0f""mod-online-sign"
extern
const
yp_item_t
scheme_mod_online_sign
[];
int
check_mod_online_sign
(
knotd_conf_check_args_t
*
args
);
#define C_MOD_SYNTH_RECORD "\x10""mod-synth-record"
extern
const
yp_item_t
scheme_mod_synth_record
[];
int
check_mod_synth_record
(
knotd_conf_check_args_t
*
args
);
src/knot/conf/scheme.c
View file @
16e5ccdc
...
...
@@ -21,6 +21,7 @@
#include "knot/conf/scheme.h"
#include "knot/conf/confio.h"
#include "knot/conf/migration.h"
#include "knot/conf/tools.h"
#include "knot/common/log.h"
#include "knot/journal/journal.h"
...
...
@@ -296,5 +297,8 @@ const yp_item_t conf_scheme[] = {
{
C_TPL
,
YP_TGRP
,
YP_VGRP
=
{
desc_template
},
YP_FMULTI
,
{
check_template
}
},
{
C_ZONE
,
YP_TGRP
,
YP_VGRP
=
{
desc_zone
},
YP_FMULTI
|
CONF_IO_FZONE
,
{
check_zone
}
},
{
C_INCL
,
YP_TSTR
,
YP_VNONE
,
CONF_IO_FDIFF_ZONES
|
CONF_IO_FRLD_ALL
,
{
include_file
}
},
/* Renamed modules. */
{
C_MOD_ONLINE_SIGN
,
YP_TGRP
,
YP_VGRP
=
{
scheme_mod_online_sign
},
YP_FMULTI
,
{
check_mod_online_sign
}
},
{
C_MOD_SYNTH_RECORD
,
YP_TGRP
,
YP_VGRP
=
{
scheme_mod_synth_record
},
YP_FMULTI
,
{
check_mod_synth_record
}
},
{
NULL
}
};
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