diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-11-21 10:40:07 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-12-04 14:39:14 +0100 |
commit | 9f0f978c8daa764d01f0892ef7b5e443f7c551a8 (patch) | |
tree | eac141be7b7139b0f3b4fb18b7fb1042f9f6ee72 /src/vty | |
parent | e15ac060e7ae78d4c3569d7fc9071bcf49807e05 (diff) |
vty: Check with the application before writing the config
For the BSC/NITB application we see that people modify the band
without modifying the ARFCN. This creates an unbootable config.
Using the new hook the BSC/NITB can check if the config is
consistent and prevent the config file being written.
Related: SYS#739
Diffstat (limited to 'src/vty')
-rw-r--r-- | src/vty/command.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vty/command.c b/src/vty/command.c index 44a1b6cb..3ff5f775 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -2497,6 +2497,15 @@ DEFUN(config_write_file, char *failed_file; int rc; + if (host.app_info->config_is_consistent) { + rc = host.app_info->config_is_consistent(vty); + if (!rc) { + vty_out(vty, "Configuration is not consistent%s", + VTY_NEWLINE); + return CMD_WARNING; + } + } + if (host.config == NULL) { vty_out(vty, "Can't save to configuration file, using vtysh.%s", VTY_NEWLINE); |