[vty] CMD_AS_RANGE accidently quoted and so not expanded in vty
2008-07-02 MIYAJIMA Mitsuharu <miyajima.mitsuharu@anchor.jp>
* *.c: CMD_AS_RANGE was being used inside command strings, and thus
not being expanded, fix by dequoting.
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index f486e64..d6e0203 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-02 MIYAJIMA Mitsuharu <miyajima.mitsuharu@anchor.jp>
+
+ * *.c: CMD_AS_RANGE was being used inside command strings, and thus
+ not being expanded, fix by dequoting.
+
2008-07-02 Stephen Hemminger <stephen.hemminger@vyatta.com>
* bgp_table.{c,h}: (bgp_table_finish) Take a double pointer and
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index b93b268..78ad3f0 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -47,6 +47,7 @@
#include "bgpd/bgp_filter.h"
#include "bgpd/bgp_mplsvpn.h"
#include "bgpd/bgp_ecommunity.h"
+#include "bgpd/bgp_vty.h"
/* Memo of route-map commands.
@@ -3451,7 +3452,7 @@
DEFUN (set_aggregator_as,
set_aggregator_as_cmd,
- "set aggregator as CMD_AS_RANGE A.B.C.D",
+ "set aggregator as " CMD_AS_RANGE " A.B.C.D",
SET_STR
"BGP aggregator attribute\n"
"AS number of aggregator\n"
@@ -3523,7 +3524,7 @@
ALIAS (no_set_aggregator_as,
no_set_aggregator_as_val_cmd,
- "no set aggregator as CMD_AS_RANGE A.B.C.D",
+ "no set aggregator as " CMD_AS_RANGE " A.B.C.D",
NO_STR
SET_STR
"BGP aggregator attribute\n"
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index f1749a7..7a7b3fd 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -308,7 +308,7 @@
/* "router bgp" commands. */
DEFUN (router_bgp,
router_bgp_cmd,
- "router bgp CMD_AS_RANGE",
+ "router bgp " CMD_AS_RANGE,
ROUTER_STR
BGP_STR
AS_STR)
@@ -348,7 +348,7 @@
ALIAS (router_bgp,
router_bgp_view_cmd,
- "router bgp CMD_AS_RANGE view WORD",
+ "router bgp " CMD_AS_RANGE " view WORD",
ROUTER_STR
BGP_STR
AS_STR
@@ -358,7 +358,7 @@
/* "no router bgp" commands. */
DEFUN (no_router_bgp,
no_router_bgp_cmd,
- "no router bgp CMD_AS_RANGE",
+ "no router bgp " CMD_AS_RANGE,
NO_STR
ROUTER_STR
BGP_STR
@@ -388,7 +388,7 @@
ALIAS (no_router_bgp,
no_router_bgp_view_cmd,
- "no router bgp CMD_AS_RANGE view WORD",
+ "no router bgp " CMD_AS_RANGE " view WORD",
NO_STR
ROUTER_STR
BGP_STR
@@ -539,7 +539,7 @@
DEFUN (bgp_confederation_identifier,
bgp_confederation_identifier_cmd,
- "bgp confederation identifier CMD_AS_RANGE",
+ "bgp confederation identifier " CMD_AS_RANGE,
"BGP specific commands\n"
"AS confederation parameters\n"
"AS number\n"
@@ -580,7 +580,7 @@
ALIAS (no_bgp_confederation_identifier,
no_bgp_confederation_identifier_arg_cmd,
- "no bgp confederation identifier CMD_AS_RANGE",
+ "no bgp confederation identifier " CMD_AS_RANGE,
NO_STR
"BGP specific commands\n"
"AS confederation parameters\n"
@@ -589,7 +589,7 @@
DEFUN (bgp_confederation_peers,
bgp_confederation_peers_cmd,
- "bgp confederation peers .CMD_AS_RANGE",
+ "bgp confederation peers ." CMD_AS_RANGE,
"BGP specific commands\n"
"AS confederation parameters\n"
"Peer ASs in BGP confederation\n"
@@ -619,7 +619,7 @@
DEFUN (no_bgp_confederation_peers,
no_bgp_confederation_peers_cmd,
- "no bgp confederation peers .CMD_AS_RANGE",
+ "no bgp confederation peers ." CMD_AS_RANGE,
NO_STR
"BGP specific commands\n"
"AS confederation parameters\n"
@@ -1288,7 +1288,7 @@
DEFUN (neighbor_remote_as,
neighbor_remote_as_cmd,
- NEIGHBOR_CMD2 "remote-as CMD_AS_RANGE",
+ NEIGHBOR_CMD2 "remote-as " CMD_AS_RANGE,
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Specify a BGP neighbor\n"
@@ -1352,7 +1352,7 @@
ALIAS (no_neighbor,
no_neighbor_remote_as_cmd,
- NO_NEIGHBOR_CMD "remote-as CMD_AS_RANGE",
+ NO_NEIGHBOR_CMD "remote-as " CMD_AS_RANGE,
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR
@@ -1382,7 +1382,7 @@
DEFUN (no_neighbor_peer_group_remote_as,
no_neighbor_peer_group_remote_as_cmd,
- "no neighbor WORD remote-as CMD_AS_RANGE",
+ "no neighbor WORD remote-as " CMD_AS_RANGE,
NO_STR
NEIGHBOR_STR
"Neighbor tag\n"
@@ -1404,7 +1404,7 @@
DEFUN (neighbor_local_as,
neighbor_local_as_cmd,
- NEIGHBOR_CMD2 "local-as CMD_AS_RANGE",
+ NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE,
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Specify a local-as number\n"
@@ -1423,7 +1423,7 @@
DEFUN (neighbor_local_as_no_prepend,
neighbor_local_as_no_prepend_cmd,
- NEIGHBOR_CMD2 "local-as CMD_AS_RANGE no-prepend",
+ NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE " no-prepend",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Specify a local-as number\n"
@@ -1462,7 +1462,7 @@
ALIAS (no_neighbor_local_as,
no_neighbor_local_as_val_cmd,
- NO_NEIGHBOR_CMD2 "local-as CMD_AS_RANGE",
+ NO_NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE,
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
@@ -1471,7 +1471,7 @@
ALIAS (no_neighbor_local_as,
no_neighbor_local_as_val2_cmd,
- NO_NEIGHBOR_CMD2 "local-as CMD_AS_RANGE no-prepend",
+ NO_NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE " no-prepend",
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
@@ -4322,7 +4322,7 @@
DEFUN (clear_ip_bgp_as,
clear_ip_bgp_as_cmd,
- "clear ip bgp CMD_AS_RANGE",
+ "clear ip bgp " CMD_AS_RANGE,
CLEAR_STR
IP_STR
BGP_STR
@@ -4333,14 +4333,14 @@
ALIAS (clear_ip_bgp_as,
clear_bgp_as_cmd,
- "clear bgp CMD_AS_RANGE",
+ "clear bgp " CMD_AS_RANGE,
CLEAR_STR
BGP_STR
"Clear peers with the AS number\n")
ALIAS (clear_ip_bgp_as,
clear_bgp_ipv6_as_cmd,
- "clear bgp ipv6 CMD_AS_RANGE",
+ "clear bgp ipv6 " CMD_AS_RANGE,
CLEAR_STR
BGP_STR
"Address family\n"
@@ -4852,7 +4852,7 @@
DEFUN (clear_ip_bgp_as_soft_out,
clear_ip_bgp_as_soft_out_cmd,
- "clear ip bgp CMD_AS_RANGE soft out",
+ "clear ip bgp " CMD_AS_RANGE " soft out",
CLEAR_STR
IP_STR
BGP_STR
@@ -4866,7 +4866,7 @@
ALIAS (clear_ip_bgp_as_soft_out,
clear_ip_bgp_as_out_cmd,
- "clear ip bgp CMD_AS_RANGE out",
+ "clear ip bgp " CMD_AS_RANGE " out",
CLEAR_STR
IP_STR
BGP_STR
@@ -4875,7 +4875,7 @@
DEFUN (clear_ip_bgp_as_ipv4_soft_out,
clear_ip_bgp_as_ipv4_soft_out_cmd,
- "clear ip bgp CMD_AS_RANGE ipv4 (unicast|multicast) soft out",
+ "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) soft out",
CLEAR_STR
IP_STR
BGP_STR
@@ -4896,7 +4896,7 @@
ALIAS (clear_ip_bgp_as_ipv4_soft_out,
clear_ip_bgp_as_ipv4_out_cmd,
- "clear ip bgp CMD_AS_RANGE ipv4 (unicast|multicast) out",
+ "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) out",
CLEAR_STR
IP_STR
BGP_STR
@@ -4908,7 +4908,7 @@
DEFUN (clear_ip_bgp_as_vpnv4_soft_out,
clear_ip_bgp_as_vpnv4_soft_out_cmd,
- "clear ip bgp CMD_AS_RANGE vpnv4 unicast soft out",
+ "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast soft out",
CLEAR_STR
IP_STR
BGP_STR
@@ -4924,7 +4924,7 @@
ALIAS (clear_ip_bgp_as_vpnv4_soft_out,
clear_ip_bgp_as_vpnv4_out_cmd,
- "clear ip bgp CMD_AS_RANGE vpnv4 unicast out",
+ "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast out",
CLEAR_STR
IP_STR
BGP_STR
@@ -4935,7 +4935,7 @@
DEFUN (clear_bgp_as_soft_out,
clear_bgp_as_soft_out_cmd,
- "clear bgp CMD_AS_RANGE soft out",
+ "clear bgp " CMD_AS_RANGE " soft out",
CLEAR_STR
BGP_STR
"Clear peers with the AS number\n"
@@ -4948,7 +4948,7 @@
ALIAS (clear_bgp_as_soft_out,
clear_bgp_ipv6_as_soft_out_cmd,
- "clear bgp ipv6 CMD_AS_RANGE soft out",
+ "clear bgp ipv6 " CMD_AS_RANGE " soft out",
CLEAR_STR
BGP_STR
"Address family\n"
@@ -4958,7 +4958,7 @@
ALIAS (clear_bgp_as_soft_out,
clear_bgp_as_out_cmd,
- "clear bgp CMD_AS_RANGE out",
+ "clear bgp " CMD_AS_RANGE " out",
CLEAR_STR
BGP_STR
"Clear peers with the AS number\n"
@@ -4966,7 +4966,7 @@
ALIAS (clear_bgp_as_soft_out,
clear_bgp_ipv6_as_out_cmd,
- "clear bgp ipv6 CMD_AS_RANGE out",
+ "clear bgp ipv6 " CMD_AS_RANGE " out",
CLEAR_STR
BGP_STR
"Address family\n"
@@ -5756,7 +5756,7 @@
DEFUN (clear_ip_bgp_as_soft_in,
clear_ip_bgp_as_soft_in_cmd,
- "clear ip bgp CMD_AS_RANGE soft in",
+ "clear ip bgp " CMD_AS_RANGE " soft in",
CLEAR_STR
IP_STR
BGP_STR
@@ -5770,7 +5770,7 @@
ALIAS (clear_ip_bgp_as_soft_in,
clear_ip_bgp_as_in_cmd,
- "clear ip bgp CMD_AS_RANGE in",
+ "clear ip bgp " CMD_AS_RANGE " in",
CLEAR_STR
IP_STR
BGP_STR
@@ -5779,7 +5779,7 @@
DEFUN (clear_ip_bgp_as_in_prefix_filter,
clear_ip_bgp_as_in_prefix_filter_cmd,
- "clear ip bgp CMD_AS_RANGE in prefix-filter",
+ "clear ip bgp " CMD_AS_RANGE " in prefix-filter",
CLEAR_STR
IP_STR
BGP_STR
@@ -5793,7 +5793,7 @@
DEFUN (clear_ip_bgp_as_ipv4_soft_in,
clear_ip_bgp_as_ipv4_soft_in_cmd,
- "clear ip bgp CMD_AS_RANGE ipv4 (unicast|multicast) soft in",
+ "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) soft in",
CLEAR_STR
IP_STR
BGP_STR
@@ -5814,7 +5814,7 @@
ALIAS (clear_ip_bgp_as_ipv4_soft_in,
clear_ip_bgp_as_ipv4_in_cmd,
- "clear ip bgp CMD_AS_RANGE ipv4 (unicast|multicast) in",
+ "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) in",
CLEAR_STR
IP_STR
BGP_STR
@@ -5826,7 +5826,7 @@
DEFUN (clear_ip_bgp_as_ipv4_in_prefix_filter,
clear_ip_bgp_as_ipv4_in_prefix_filter_cmd,
- "clear ip bgp CMD_AS_RANGE ipv4 (unicast|multicast) in prefix-filter",
+ "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) in prefix-filter",
CLEAR_STR
IP_STR
BGP_STR
@@ -5847,7 +5847,7 @@
DEFUN (clear_ip_bgp_as_vpnv4_soft_in,
clear_ip_bgp_as_vpnv4_soft_in_cmd,
- "clear ip bgp CMD_AS_RANGE vpnv4 unicast soft in",
+ "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast soft in",
CLEAR_STR
IP_STR
BGP_STR
@@ -5863,7 +5863,7 @@
ALIAS (clear_ip_bgp_as_vpnv4_soft_in,
clear_ip_bgp_as_vpnv4_in_cmd,
- "clear ip bgp CMD_AS_RANGE vpnv4 unicast in",
+ "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast in",
CLEAR_STR
IP_STR
BGP_STR
@@ -5874,7 +5874,7 @@
DEFUN (clear_bgp_as_soft_in,
clear_bgp_as_soft_in_cmd,
- "clear bgp CMD_AS_RANGE soft in",
+ "clear bgp " CMD_AS_RANGE " soft in",
CLEAR_STR
BGP_STR
"Clear peers with the AS number\n"
@@ -5887,7 +5887,7 @@
ALIAS (clear_bgp_as_soft_in,
clear_bgp_ipv6_as_soft_in_cmd,
- "clear bgp ipv6 CMD_AS_RANGE soft in",
+ "clear bgp ipv6 " CMD_AS_RANGE " soft in",
CLEAR_STR
BGP_STR
"Address family\n"
@@ -5897,7 +5897,7 @@
ALIAS (clear_bgp_as_soft_in,
clear_bgp_as_in_cmd,
- "clear bgp CMD_AS_RANGE in",
+ "clear bgp " CMD_AS_RANGE " in",
CLEAR_STR
BGP_STR
"Clear peers with the AS number\n"
@@ -5905,7 +5905,7 @@
ALIAS (clear_bgp_as_soft_in,
clear_bgp_ipv6_as_in_cmd,
- "clear bgp ipv6 CMD_AS_RANGE in",
+ "clear bgp ipv6 " CMD_AS_RANGE " in",
CLEAR_STR
BGP_STR
"Address family\n"
@@ -5914,7 +5914,7 @@
DEFUN (clear_bgp_as_in_prefix_filter,
clear_bgp_as_in_prefix_filter_cmd,
- "clear bgp CMD_AS_RANGE in prefix-filter",
+ "clear bgp " CMD_AS_RANGE " in prefix-filter",
CLEAR_STR
BGP_STR
"Clear peers with the AS number\n"
@@ -5927,7 +5927,7 @@
ALIAS (clear_bgp_as_in_prefix_filter,
clear_bgp_ipv6_as_in_prefix_filter_cmd,
- "clear bgp ipv6 CMD_AS_RANGE in prefix-filter",
+ "clear bgp ipv6 " CMD_AS_RANGE " in prefix-filter",
CLEAR_STR
BGP_STR
"Address family\n"
@@ -6242,7 +6242,7 @@
DEFUN (clear_ip_bgp_as_soft,
clear_ip_bgp_as_soft_cmd,
- "clear ip bgp CMD_AS_RANGE soft",
+ "clear ip bgp " CMD_AS_RANGE " soft",
CLEAR_STR
IP_STR
BGP_STR
@@ -6255,7 +6255,7 @@
DEFUN (clear_ip_bgp_as_ipv4_soft,
clear_ip_bgp_as_ipv4_soft_cmd,
- "clear ip bgp CMD_AS_RANGE ipv4 (unicast|multicast) soft",
+ "clear ip bgp " CMD_AS_RANGE " ipv4 (unicast|multicast) soft",
CLEAR_STR
IP_STR
BGP_STR
@@ -6275,7 +6275,7 @@
DEFUN (clear_ip_bgp_as_vpnv4_soft,
clear_ip_bgp_as_vpnv4_soft_cmd,
- "clear ip bgp CMD_AS_RANGE vpnv4 unicast soft",
+ "clear ip bgp " CMD_AS_RANGE " vpnv4 unicast soft",
CLEAR_STR
IP_STR
BGP_STR
@@ -6290,7 +6290,7 @@
DEFUN (clear_bgp_as_soft,
clear_bgp_as_soft_cmd,
- "clear bgp CMD_AS_RANGE soft",
+ "clear bgp " CMD_AS_RANGE " soft",
CLEAR_STR
BGP_STR
"Clear peers with the AS number\n"
@@ -6302,7 +6302,7 @@
ALIAS (clear_bgp_as_soft,
clear_bgp_ipv6_as_soft_cmd,
- "clear bgp ipv6 CMD_AS_RANGE soft",
+ "clear bgp ipv6 " CMD_AS_RANGE " soft",
CLEAR_STR
BGP_STR
"Address family\n"