diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-05-16 23:07:54 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-05-21 21:09:49 +0200 |
commit | c8dde10f58213f2011f074fcd627f4c5f463b013 (patch) | |
tree | e8394764c291d7eb4e3b64eab634adb7facd9adc /ripngd | |
parent | Merge pull request #2267 from donaldsharp/flim_flam (diff) | |
download | frr-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 'ripngd')
-rw-r--r-- | ripngd/ripng_main.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c index 8ef27daab..e4501d6f8 100644 --- a/ripngd/ripng_main.c +++ b/ripngd/ripng_main.c @@ -40,6 +40,9 @@ #include "ripngd/ripngd.h" /* RIPngd options. */ +#if CONFDATE > 20190521 + CPP_NOTICE("-r / --retain has reached deprecation EOL, remove") +#endif struct option longopts[] = {{"retain", no_argument, NULL, 'r'}, {0}}; /* ripngd privileges */ @@ -60,11 +63,6 @@ struct zebra_privs_t ripngd_privs = { .cap_num_i = 0}; -/* RIPngd program name */ - -/* Route retain mode flag. */ -int retain_mode = 0; - /* Master of threads. */ struct thread_master *master; @@ -88,8 +86,7 @@ static void sigint(void) { zlog_notice("Terminating on signal"); - if (!retain_mode) - ripng_clean(); + ripng_clean(); ripng_zebra_stop(); frr_fini(); @@ -130,28 +127,36 @@ FRR_DAEMON_INFO(ripngd, RIPNG, .vty_port = RIPNG_VTY_PORT, .privs = &ripngd_privs, ) +#if CONFDATE > 20190521 +CPP_NOTICE("-r / --retain has reached deprecation EOL, remove") +#endif +#define DEPRECATED_OPTIONS "r" + /* RIPngd main routine. */ int main(int argc, char **argv) { frr_preinit(&ripngd_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, ""); while (1) { int opt; 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; |