diff options
author | Paul Jakma <paul.jakma@sun.com> | 2008-07-02 13:40:33 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2008-07-02 13:40:33 +0000 |
commit | 320da874d75acb7d0cb69c531ee6255e63fe0336 (patch) | |
tree | 063cceec70b3d71ef65a957956088f06d6b5bbe5 | |
parent | b608d5b5ac469d47072aedd573e5d3475f4d9cf4 (diff) |
[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.
-rw-r--r-- | bgpd/ChangeLog | 5 | ||||
-rw-r--r-- | bgpd/bgp_routemap.c | 5 | ||||
-rw-r--r-- | bgpd/bgp_vty.c | 94 | ||||
-rw-r--r-- | vtysh/ChangeLog | 5 | ||||
-rwxr-xr-x | vtysh/extract.pl.in | 4 | ||||
-rw-r--r-- | vtysh/vtysh.c | 3 |
6 files changed, 64 insertions, 52 deletions
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog index f486e648..d6e02036 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 b93b2682..78ad3f08 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -47,6 +47,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #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 (no_set_atomic_aggregate, 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 @@ DEFUN (no_set_aggregator_as, 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 f1749a78..7a7b3fdf 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -308,7 +308,7 @@ DEFUN_DEPRECATED (neighbor_version, /* "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 @@ DEFUN (router_bgp, 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 @@ ALIAS (router_bgp, /* "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 @@ DEFUN (no_router_bgp, 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 @@ ALIAS (no_bgp_cluster_id, 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 @@ DEFUN (no_bgp_confederation_identifier, 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 @@ ALIAS (no_bgp_confederation_identifier, 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 (bgp_confederation_peers, 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 @@ peer_remote_as_vty (struct vty *vty, const char *peer_str, 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 @@ DEFUN (no_neighbor, 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, 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 (no_neighbor_peer_group_remote_as, 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, 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 @@ DEFUN (no_neighbor_local_as, 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, 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 @@ ALIAS (clear_ip_bgp_external, 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 @@ DEFUN (clear_ip_bgp_as, 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 @@ ALIAS (clear_bgp_external_soft_out, 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 @@ DEFUN (clear_ip_bgp_as_soft_out, 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 @@ ALIAS (clear_ip_bgp_as_soft_out, 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 @@ DEFUN (clear_ip_bgp_as_ipv4_soft_out, 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 @@ ALIAS (clear_ip_bgp_as_ipv4_soft_out, 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 @@ DEFUN (clear_ip_bgp_as_vpnv4_soft_out, 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 @@ ALIAS (clear_ip_bgp_as_vpnv4_soft_out, 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 @@ DEFUN (clear_bgp_as_soft_out, 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, 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, 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 @@ ALIAS (clear_bgp_external_in_prefix_filter, 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 @@ DEFUN (clear_ip_bgp_as_soft_in, 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 @@ ALIAS (clear_ip_bgp_as_soft_in, 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_in_prefix_filter, 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 @@ DEFUN (clear_ip_bgp_as_ipv4_soft_in, 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 @@ ALIAS (clear_ip_bgp_as_ipv4_soft_in, 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_ipv4_in_prefix_filter, 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 @@ DEFUN (clear_ip_bgp_as_vpnv4_soft_in, 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 @@ ALIAS (clear_ip_bgp_as_vpnv4_soft_in, 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 @@ DEFUN (clear_bgp_as_soft_in, 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, 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, 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 @@ ALIAS (clear_bgp_as_soft_in, 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 @@ DEFUN (clear_bgp_as_in_prefix_filter, 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 @@ ALIAS (clear_bgp_external_soft, 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_soft, 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_ipv4_soft, 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_ip_bgp_as_vpnv4_soft, 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 @@ DEFUN (clear_bgp_as_soft, 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" diff --git a/vtysh/ChangeLog b/vtysh/ChangeLog index de62763c..c067b784 100644 --- a/vtysh/ChangeLog +++ b/vtysh/ChangeLog @@ -1,3 +1,8 @@ +2008-07-02 MIYAJIMA Mitsuharu <miyajima.mitsuharu@anchor.jp> + + * CMD_AS_RANGE was being used inside command strings, and thus + not being expanded, fix by dequoting. + 2007-06-20 Nicolas Deffayet <nicolas@deffayet.com> * vtysh.c: (vtysh_write_terminal) Write 'end' when done, diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in index 789819c6..52a06f51 100755 --- a/vtysh/extract.pl.in +++ b/vtysh/extract.pl.in @@ -37,8 +37,8 @@ $ignore{'"router ripng"'} = "ignore"; $ignore{'"router ospf"'} = "ignore"; $ignore{'"router ospf <0-65535>"'} = "ignore"; $ignore{'"router ospf6"'} = "ignore"; -$ignore{'"router bgp CMD_AS_RANGE"'} = "ignore"; -$ignore{'"router bgp CMD_AS_RANGE view WORD"'} = "ignore"; +$ignore{'"router bgp <1-4294967295>"'} = "ignore"; +$ignore{'"router bgp <1-4294967295> view WORD"'} = "ignore"; $ignore{'"router isis WORD"'} = "ignore"; $ignore{'"router zebra"'} = "ignore"; $ignore{'"address-family ipv4"'} = "ignore"; diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 9f47515d..b508749a 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -34,6 +34,7 @@ #include "memory.h" #include "vtysh/vtysh.h" #include "log.h" +#include "bgpd/bgp_vty.h" /* Struct VTY. */ struct vty *vty; @@ -838,7 +839,7 @@ DEFUNSH (VTYSH_ALL, DEFUNSH (VTYSH_BGPD, router_bgp, router_bgp_cmd, - "router bgp CMD_AS_RANGE", + "router bgp " CMD_AS_RANGE, ROUTER_STR BGP_STR AS_STR) |