summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2019-12-17 15:56:26 +0100
committerMark Stapp <mjs@voltanet.io>2019-12-17 15:56:26 +0100
commit7183a034d10776da993113b7b98f5ad3ed0e7231 (patch)
tree43df2c358359aee7d89679581b7f3d82b65499c6 /vtysh
parentMerge pull request #5528 from opensourcerouting/bmp-dns-fixing (diff)
downloadfrr-7183a034d10776da993113b7b98f5ad3ed0e7231.tar.xz
frr-7183a034d10776da993113b7b98f5ad3ed0e7231.zip
vtysh: add an alias for the nexthop-group config targets
Use an alias for the daemons who process the nexthop-group config cli; makes it easier to expand that list in the future. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'vtysh')
-rwxr-xr-xvtysh/extract.pl.in2
-rw-r--r--vtysh/vtysh.c11
-rw-r--r--vtysh/vtysh.h2
3 files changed, 10 insertions, 5 deletions
diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in
index e8df08ef6..13413888b 100755
--- a/vtysh/extract.pl.in
+++ b/vtysh/extract.pl.in
@@ -103,7 +103,7 @@ sub scan_file {
$protocol = "VTYSH_RIPD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_ZEBRA";
}
elsif ($file =~ /lib\/nexthop_group\.c$/) {
- $protocol = "VTYSH_PBRD | VTYSH_SHARPD";
+ $protocol = "VTYSH_NH_GROUP";
}
elsif ($file =~ /lib\/plist\.c$/) {
if ($defun_array[1] =~ m/ipv6/) {
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 5c4e8a313..b7d35caa3 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -2163,7 +2163,8 @@ DEFUNSH(VTYSH_ZEBRA, vtysh_pseudowire, vtysh_pseudowire_cmd,
return CMD_SUCCESS;
}
-DEFUNSH(VTYSH_PBRD | VTYSH_SHARPD, vtysh_nexthop_group, vtysh_nexthop_group_cmd,
+DEFUNSH(VTYSH_NH_GROUP,
+ vtysh_nexthop_group, vtysh_nexthop_group_cmd,
"nexthop-group NHGNAME",
"Nexthop Group configuration\n"
"Name of the Nexthop Group\n")
@@ -2172,7 +2173,7 @@ DEFUNSH(VTYSH_PBRD | VTYSH_SHARPD, vtysh_nexthop_group, vtysh_nexthop_group_cmd,
return CMD_SUCCESS;
}
-DEFSH(VTYSH_PBRD | VTYSH_SHARPD, vtysh_no_nexthop_group_cmd,
+DEFSH(VTYSH_NH_GROUP, vtysh_no_nexthop_group_cmd,
"no nexthop-group NHGNAME",
NO_STR
"Nexthop Group Configuration\n"
@@ -2209,13 +2210,15 @@ DEFUNSH(VTYSH_VRF, vtysh_quit_vrf, vtysh_quit_vrf_cmd, "quit",
return vtysh_exit_vrf(self, vty, argc, argv);
}
-DEFUNSH(VTYSH_PBRD | VTYSH_SHARPD, vtysh_exit_nexthop_group, vtysh_exit_nexthop_group_cmd,
+DEFUNSH(VTYSH_NH_GROUP,
+ vtysh_exit_nexthop_group, vtysh_exit_nexthop_group_cmd,
"exit", "Exit current mode and down to previous mode\n")
{
return vtysh_exit(vty);
}
-DEFUNSH(VTYSH_PBRD | VTYSH_SHARPD, vtysh_quit_nexthop_group, vtysh_quit_nexthop_group_cmd,
+DEFUNSH(VTYSH_NH_GROUP,
+ vtysh_quit_nexthop_group, vtysh_quit_nexthop_group_cmd,
"quit", "Exit current mode and down to previous mode\n")
{
return vtysh_exit_nexthop_group(self, vty, argc, argv);
diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h
index b16761b41..d0edbb271 100644
--- a/vtysh/vtysh.h
+++ b/vtysh/vtysh.h
@@ -56,6 +56,8 @@ DECLARE_MGROUP(MVTYSH)
#define VTYSH_INTERFACE VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_ISISD|VTYSH_PIMD|VTYSH_NHRPD|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_PBRD|VTYSH_FABRICD|VTYSH_VRRPD
#define VTYSH_VRF VTYSH_ZEBRA|VTYSH_PIMD|VTYSH_STATICD
#define VTYSH_KEYS VTYSH_RIPD|VTYSH_EIGRPD
+/* Daemons who can process nexthop-group configs */
+#define VTYSH_NH_GROUP VTYSH_PBRD|VTYSH_SHARPD
enum vtysh_write_integrated {
WRITE_INTEGRATED_UNSPECIFIED,