From b6ab29296fc7dc5b0a6ad0e5345aca3c2c701cba Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 14 Apr 2017 20:13:26 -0400 Subject: [PATCH 1/2] bgpd: Fix 'set as-path prepend last-as 10' 1) Fix missing newline in help string 2) Make the ability to have 10 be consistent with the stable/2.0 branch. Signed-off-by: Donald Sharp --- bgpd/bgp_routemap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index bafc81eaf8..9b5a7a5ebb 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -1437,7 +1437,7 @@ route_set_aspath_prepend_compile (const char *arg) { unsigned int num; - if (sscanf(arg, "last-as %u", &num) == 1 && num > 0 && num < 10) + if (sscanf(arg, "last-as %u", &num) == 1 && num > 0 && num <= 10) return (void*)(uintptr_t)num; return route_aspath_compile(arg); @@ -3677,12 +3677,12 @@ DEFUN (set_aspath_prepend_asn, DEFUN (set_aspath_prepend_lastas, set_aspath_prepend_lastas_cmd, - "set as-path prepend last-as (1-9)", + "set as-path prepend last-as (1-10)", SET_STR "Transform BGP AS_PATH attribute\n" "Prepend to the as-path\n" "Use the peer's AS-number\n" - "Number of times to insert") + "Number of times to insert\n") { return set_aspath_prepend_asn (self, vty, argc, argv); } From 5260e25d2000dcd65b9e7f710f20482e1bb9f2df Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 14 Apr 2017 20:39:56 -0400 Subject: [PATCH 2/2] bgpd: 'show .... bgp regexp WORD' fixed The command was always just returning as part of the bgp_regexp_show function. Signed-off-by: Donald Sharp --- bgpd/bgp_route.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 4e87ea1ece..32cf0bcb89 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8562,8 +8562,6 @@ static int bgp_show_regexp (struct vty *vty, const char *regstr, afi_t afi, safi_t safi, enum bgp_show_type type) { - return CMD_SUCCESS; - regex_t *regex; int rc;