summaryrefslogtreecommitdiffstats
path: root/src/utils/knotc/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/knotc/commands.c')
-rw-r--r--src/utils/knotc/commands.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/utils/knotc/commands.c b/src/utils/knotc/commands.c
index c2c25a2..5cc1a14 100644
--- a/src/utils/knotc/commands.c
+++ b/src/utils/knotc/commands.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2024 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
@@ -51,6 +51,7 @@
#define CMD_ZONE_BACKUP "zone-backup"
#define CMD_ZONE_RESTORE "zone-restore"
#define CMD_ZONE_SIGN "zone-sign"
+#define CMD_ZONE_VALIDATE "zone-validate"
#define CMD_ZONE_KEYS_LOAD "zone-keys-load"
#define CMD_ZONE_KEY_ROLL "zone-key-rollover"
#define CMD_ZONE_KSK_SBM "zone-ksk-submitted"
@@ -99,7 +100,7 @@
static int check_args(cmd_args_t *args, int min, int max)
{
if (max == 0 && args->argc > 0) {
- log_error("command doesn't take arguments");
+ log_error("command does not take arguments");
return KNOT_EINVAL;
} else if (min == max && args->argc != min) {
log_error("command requires %i arguments", min);
@@ -272,6 +273,7 @@ static void format_data(cmd_args_t *args, knot_ctl_type_t data_type,
case CTL_ZONE_BACKUP:
case CTL_ZONE_RESTORE:
case CTL_ZONE_SIGN:
+ case CTL_ZONE_VALIDATE:
case CTL_ZONE_KEYS_LOAD:
case CTL_ZONE_KEY_ROLL:
case CTL_ZONE_KSK_SBM:
@@ -411,6 +413,7 @@ static void format_block(ctl_cmd_t cmd, bool failed, bool empty)
case CTL_ZONE_BACKUP:
case CTL_ZONE_RESTORE:
case CTL_ZONE_SIGN:
+ case CTL_ZONE_VALIDATE:
case CTL_ZONE_KEYS_LOAD:
case CTL_ZONE_KEY_ROLL:
case CTL_ZONE_KSK_SBM:
@@ -1294,6 +1297,7 @@ const cmd_desc_t cmd_table[] = {
{ CMD_ZONE_BACKUP, cmd_zone_filter_ctl, CTL_ZONE_BACKUP, CMD_FOPT_ZONE },
{ CMD_ZONE_RESTORE, cmd_zone_filter_ctl, CTL_ZONE_RESTORE, CMD_FOPT_ZONE },
{ CMD_ZONE_SIGN, cmd_zone_ctl, CTL_ZONE_SIGN, CMD_FOPT_ZONE },
+ { CMD_ZONE_VALIDATE, cmd_zone_ctl, CTL_ZONE_VALIDATE, CMD_FOPT_ZONE },
{ CMD_ZONE_KEYS_LOAD, cmd_zone_ctl, CTL_ZONE_KEYS_LOAD, CMD_FOPT_ZONE },
{ CMD_ZONE_KEY_ROLL, cmd_zone_key_roll_ctl, CTL_ZONE_KEY_ROLL, CMD_FREQ_ZONE },
{ CMD_ZONE_KSK_SBM, cmd_zone_ctl, CTL_ZONE_KSK_SBM, CMD_FREQ_ZONE | CMD_FOPT_ZONE },
@@ -1347,6 +1351,7 @@ static const cmd_help_t cmd_help_table[] = {
{ CMD_ZONE_BACKUP, "[<zone>...] [<filter>...] +backupdir <dir>", "Backup zone data and metadata. (#)" },
{ CMD_ZONE_RESTORE, "[<zone>...] [<filter>...] +backupdir <dir>", "Restore zone data and metadata. (#)" },
{ CMD_ZONE_SIGN, "[<zone>...]", "Re-sign the automatically signed zone. (#)" },
+ { CMD_ZONE_VALIDATE, "[<zone>...]", "Trigger a DNSSEC validation of the zone. (#)" },
{ CMD_ZONE_KEYS_LOAD, "[<zone>...]", "Re-load keys from KASP database, sign the zone. (#)" },
{ CMD_ZONE_KEY_ROLL, " <zone> ksk|zsk", "Trigger immediate key rollover. (#)" },
{ CMD_ZONE_KSK_SBM, " <zone>...", "When KSK submission, confirm parent's DS presence. (#)" },