From 0b0668e6198e87a99f8c27348c7ab64264f39638 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 27 Jan 2015 20:24:15 +0100 Subject: [PATCH] zebra: mark multicast commands experimental depending on feedback from actually having these commands in a released version, we may want to adjust them. Thus, mark them as experimental so users are aware of this. Cc: Everton Marques Cc: Balaji G Signed-off-by: David Lamparter --- lib/vty.h | 8 ++++++++ zebra/zebra_vty.c | 11 +++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/vty.h b/lib/vty.h index 3694106403..f0286202bd 100644 --- a/lib/vty.h +++ b/lib/vty.h @@ -253,6 +253,14 @@ do { } \ } while (0) +#define VTY_WARN_EXPERIMENTAL() \ +do { \ + vty_out (vty, "%% WARNING: this command is experimental. Both its name and" \ + " parameters may%s%% change in a future version of Quagga," \ + " possibly breaking your configuration!%s", \ + VTY_NEWLINE, VTY_NEWLINE); \ +} while (0) + /* Exported variables */ extern char integrate_default[]; diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 146ebfb51a..c6b5c43adf 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -179,7 +179,8 @@ DEFUN (ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : NULL, NULL); + VTY_WARN_EXPERIMENTAL(); + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 1, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : NULL, NULL); } ALIAS (ip_mroute_dist, @@ -201,7 +202,8 @@ DEFUN (no_ip_mroute_dist, "Nexthop interface name\n" "Distance\n") { - return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : NULL, NULL); + VTY_WARN_EXPERIMENTAL(); + return zebra_static_ipv4 (vty, SAFI_MULTICAST, 0, argv[0], NULL, argv[1], NULL, NULL, argc > 2 ? argv[2] : NULL, NULL); } ALIAS (no_ip_mroute_dist, @@ -226,6 +228,8 @@ DEFUN (ip_multicast_mode, "Lookup both, use entry with lower distance\n" "Lookup both, use entry with longer prefix\n") { + VTY_WARN_EXPERIMENTAL(); + if (!strncmp (argv[0], "u", 1)) multicast_mode_ipv4_set (MCAST_URIB_ONLY); else if (!strncmp (argv[0], "mrib-o", 6)) @@ -277,6 +281,7 @@ DEFUN (show_ip_rpf, IP_STR "Display RPF information for multicast source\n") { + VTY_WARN_EXPERIMENTAL(); return do_show_ip_route(vty, VRF_DEFAULT_NAME, SAFI_MULTICAST); } @@ -293,6 +298,8 @@ DEFUN (show_ip_rpf_addr, struct rib *rib; int ret; + VTY_WARN_EXPERIMENTAL(); + ret = inet_aton (argv[0], &addr); if (ret == 0) { -- 2.39.5