static const struct option longopts[] = {
{"bgp_port", required_argument, NULL, 'p'},
{"listenon", required_argument, NULL, 'l'},
+#if CONFDATE > 20190521
+ CPP_NOTICE("-r / --retain has reached deprecation EOL, remove")
+#endif
{"retain", no_argument, NULL, 'r'},
{"no_kernel", no_argument, NULL, 'n'},
{"skip_runas", no_argument, NULL, 'S'},
},
};
-/* Route retain mode flag. */
-static int retain_mode = 0;
-
/* privileges */
static zebra_capabilities_t _caps_p[] = {ZCAP_BIND, ZCAP_NET_RAW,
ZCAP_NET_ADMIN, ZCAP_SYS_ADMIN};
assert(bm->terminating == false);
bm->terminating = true; /* global flag that shutting down */
- if (!retain_mode)
- bgp_terminate();
+ bgp_terminate();
bgp_exit(0);
.privs = &bgpd_privs, )
+#if CONFDATE > 20190521
+CPP_NOTICE("-r / --retain has reached deprecation EOL, remove")
+#endif
+#define DEPRECATED_OPTIONS "r"
+
/* Main routine of bgpd. Treatment of argument and start bgp finite
state machine is handled at here. */
int main(int argc, char **argv)
frr_preinit(&bgpd_di, argc, argv);
frr_opt_add(
- "p:l:rSne:", longopts,
+ "p:l:Sne:" DEPRECATED_OPTIONS, longopts,
" -p, --bgp_port Set BGP listen port number (0 means do not listen).\n"
" -l, --listenon Listen on specified address (implies -n)\n"
- " -r, --retain When program terminates, retain added route by bgpd.\n"
" -n, --no_kernel Do not install route to kernel.\n"
" -S, --skip_runas Skip capabilities checks, and changing user and group IDs.\n"
" -e, --ecmp Specify ECMP to use.\n");
while (1) {
opt = frr_getopt(argc, argv, 0);
+ 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;
return 1;
}
break;
- case 'r':
- retain_mode = 1;
- break;
case 'l':
bgp_address = optarg;
/* listenon implies -n */
#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 */
.cap_num_p = 2,
.cap_num_i = 0};
-/* Route retain mode flag. */
-int retain_mode = 0;
-
/* Master of threads. */
struct thread_master *master;
{
zlog_notice("Terminating on signal");
- if (!retain_mode)
- rip_clean();
+ rip_clean();
rip_zclient_stop();
frr_fini();
.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) {
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;
#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 */
.cap_num_i = 0};
-/* RIPngd program name */
-
-/* Route retain mode flag. */
-int retain_mode = 0;
-
/* Master of threads. */
struct thread_master *master;
{
zlog_notice("Terminating on signal");
- if (!retain_mode)
- ripng_clean();
+ ripng_clean();
ripng_zebra_stop();
frr_fini();
.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;