summaryrefslogtreecommitdiffstats
path: root/ripd
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-05-16 23:07:54 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-05-21 21:09:49 +0200
commitc8dde10f58213f2011f074fcd627f4c5f463b013 (patch)
treee8394764c291d7eb4e3b64eab634adb7facd9adc /ripd
parentMerge pull request #2267 from donaldsharp/flim_flam (diff)
downloadfrr-c8dde10f58213f2011f074fcd627f4c5f463b013.tar.xz
frr-c8dde10f58213f2011f074fcd627f4c5f463b013.zip
*: remove -r from daemons except zebra
This option is only implemented by 4 daemons: - BGPD - RIPD - RIPNGD - Zebra Manpages and documentation say that the option causes routes to not be uninstalled from zebra when the daemon terminates. This is true for RIPD and RIPNGD. This is not true for BGPD; in that daemon it only prevents transmission of Cease / Peer Unconfig NOTIFICATION messages to peers. Moreover, when any daemon disconnects from Zebra, all of its routes are uninstalled from Zebra and the kernel regardless of this option, rendering the option largely vestigial. It is still useful in Zebra, where it prevents all routes from being uninstalled when Zebra shuts down, so it is left there. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'ripd')
-rw-r--r--ripd/rip_main.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/ripd/rip_main.c b/ripd/rip_main.c
index 9a448e895..0194e5312 100644
--- a/ripd/rip_main.c
+++ b/ripd/rip_main.c
@@ -39,6 +39,9 @@
#include "ripd/ripd.h"
/* ripd options. */
+#if CONFDATE > 20190521
+ CPP_NOTICE("-r / --retain has reached deprecation EOL, remove")
+#endif
static struct option longopts[] = {{"retain", no_argument, NULL, 'r'}, {0}};
/* ripd privileges */
@@ -58,9 +61,6 @@ struct zebra_privs_t ripd_privs = {
.cap_num_p = 2,
.cap_num_i = 0};
-/* Route retain mode flag. */
-int retain_mode = 0;
-
/* Master of threads. */
struct thread_master *master;
@@ -85,8 +85,7 @@ static void sigint(void)
{
zlog_notice("Terminating on signal");
- if (!retain_mode)
- rip_clean();
+ rip_clean();
rip_zclient_stop();
frr_fini();
@@ -127,13 +126,17 @@ FRR_DAEMON_INFO(ripd, RIP, .vty_port = RIP_VTY_PORT,
.privs = &ripd_privs, )
+#if CONFDATE > 20190521
+CPP_NOTICE("-r / --retain has reached deprecation EOL, remove")
+#endif
+#define DEPRECATED_OPTIONS "r"
+
/* Main routine of ripd. */
int main(int argc, char **argv)
{
frr_preinit(&ripd_di, argc, argv);
- frr_opt_add(
- "r", longopts,
- " -r, --retain When program terminates, retain added route by ripd.\n");
+
+ frr_opt_add("" DEPRECATED_OPTIONS, longopts, "");
/* Command line option parse. */
while (1) {
@@ -141,15 +144,19 @@ int main(int argc, char **argv)
opt = frr_getopt(argc, argv, NULL);
+ if (opt && opt < 128 && strchr(DEPRECATED_OPTIONS, opt)) {
+ fprintf(stderr,
+ "The -%c option no longer exists.\nPlease refer to the manual.\n",
+ opt);
+ continue;
+ }
+
if (opt == EOF)
break;
switch (opt) {
case 0:
break;
- case 'r':
- retain_mode = 1;
- break;
default:
frr_help_exit(1);
break;