summaryrefslogtreecommitdiffstats
path: root/lib/command.h
diff options
context:
space:
mode:
authorPascal Mathis <mail@pascalmathis.com>2018-05-13 19:11:43 +0200
committerPascal Mathis <mail@pascalmathis.com>2018-05-13 19:11:43 +0200
commit4911ca9cab5d75b5031edb83b52423ed47798324 (patch)
tree17eee5c4c06d2dc8be13ac389ec72c469701c9be /lib/command.h
parentlib: Improved warnings for 'no (enable) password' (diff)
downloadfrr-4911ca9cab5d75b5031edb83b52423ed47798324.tar.xz
frr-4911ca9cab5d75b5031edb83b52423ed47798324.zip
lib: Moved no-password warnings into header file
The warning string which appears when the users executes 'no (enable) password' was moved into command.h and declared as a constant named 'NO_PASSWD_CMD_WARNING'. This avoids duplicate code and makes it easy to change the warning message in all places at once. Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
Diffstat (limited to 'lib/command.h')
-rw-r--r--lib/command.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/command.h b/lib/command.h
index 9ba53e090..8d9c39b0e 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -376,6 +376,10 @@ struct cmd_node {
#define CONF_BACKUP_EXT ".sav"
+/* Command warnings. */
+#define NO_PASSWD_CMD_WARNING \
+ "Please be aware that removing the password is a security risk and you should think twice about this command.\n"
+
/* IPv4 only machine should not accept IPv6 address for peer's IP
address. So we replace VTY command string like below. */
#define NEIGHBOR_ADDR_STR "Neighbor address\nIPv6 address\n"